PHP – Built In Server

 
5 Kudos
Don't
move!

As of PHP 5.4.0, the CLI SAPI provides a built-in web server.

This web server is designed for developmental purposes only, and should not be used in production.

Requests are served sequentially.

URI requests are served from the current working directory where PHP was started, unless the -t option is used to specify an explicit document root. If a URI request does not specify a file, then either index.php or index.html in the given directory are returned. If neither file exists, then a 404 response code is returned.

If a PHP file is given on the command line when the web server is started it is treated as a “router” script. The script is run at the start of each HTTP request. If this script returns FALSE, then the requested resource is returned as-is. Otherwise the script’s output is returned to the browser.

Standard MIME types are returned for files with extensions: .css, .gif, .htm, .html, .jpe, .jpeg, .jpg, .js, .ogg, .ogv, .pdf, .png, .svg, .txt, and .webm. The .htm and .svg extensions are recognized from PHP 5.4.4 onwards. The .ogg, .ogv, and .webm extensions are recognized from PHP 5.4.11 onwards. The .pdf extension is recognized from PHP 5.5.5 onwards.

 

More Info : http://php.net/manual/en/features.commandline.webserver.php

VN:F [1.9.22_1171]
Rating: 5.0/5 (1 vote cast)