Inbuilt web waiter

This web host was intentional to aid coating maturation. It may too be utilitarian for examination purposes or for coating demonstrations that are run in controlled environments. It is not intended to be a full-featured web host. It should not be exploited on a world meshing.

As of PHP 5.4.0, the CLI SAPI provides a inbuilt web host.

The web host runs a solitary one single-threaded procedure, so PHP applications bequeath carrell if a postulation is plugged.

URI requests are served from the stream functional directory where PHP was started, unless the -t choice is victimised to designate an expressed papers solution. If a URI postulation does not define a lodge, so either forefinger.php or indicator.html in the granted directory are returned. If neither charge exists, the search for indicant.php and power.html bequeath be continued in the raise directory etcetera until one is ground or the papers radical has been reached. If an power.php or power.html is institute, it is returned and $_SERVER[
$itinerary = __DIR__. $_SERVER more [ ‘REQUEST_URI’ ];
if ( is_file ( $itinerary ))
cope ( Content-Type: $mimeTypes [ $lucifer [ 0 ]] );
demand $itinerary ;
issue;

require_once __DIR__. ‘/../app/bootstrap.php’ ;

Do NOT use the -t pick if you wishing to use a router playscript, you can modification stream operative directory to the web papers theme ahead unveiling the php constitutional web waiter.

cd /d C:\Web\Waiter
php -S www.51-n.com:80 router.php -n -d expose_php=0 -d display_errors=0 -d extension_dir=ext

[e’er gets a 500 erroneousness]

php -S www.51-n.com:80 router.php -t C:\Web\Host -n -d expose_php=0 -d display_errors=0 -d extension_dir=ext