how to set a localhost server in php code example Example: run php server cd path/to/your/app php -S localhost:8000