How to Start PHP 5.4’s Built-in Server

PHP 5.4 offers a built-in web server for development. To use it, just cd into your code’s directory in the terminal (Linux or Mac) and type something like this:
$ php -S localhost:8888 -t public/

Then browse to http://localhost:8888 and whatever is in the public/ directory will be served to the browser. No more need to set up Apache on your local machine. See the documentation for more details.

Related posts:

Leave a Reply

Your email address will not be published. Required fields are marked *