Last Updated: February 25, 2016
·
1.107K
· originell

PHP Development Server

PHP 5.4+ has an integrated web server. Basically in the same vain as python's SimpleHTTPServer.

php -S localhost:8000

This should allow you a pretty quick start.

Note that I'm frequently running into problems with it binding to localhost. Replacing it with the typical 127.0.0.1 works better for me (OSX 10.8).

Also, if you want it to serve on all interfaces (-> your LAN/WAN IP) just use 0.0.0.0:8000.

Have a fresh tip? Share with Coderwall community!

Post
Post a tip
Related Tags
#php
Did you know?

PHP applications still send a browser full of JavaScript. Hardening the server does not inventory the payment, analytics, and plugin scripts that run after the HTML is delivered.

Security insights from Cside