Looking for php Answers? Try Ask4KnowledgeBase
Looking for php Keywords? Try Ask4Keywords

PHPPHP Built in server


Learn how to use the built in server to develop and test your application without the need of other tools like xamp, wamp, etc.


-STell the php that we want a webserver
<hostname>:<port>The host name and the por to be used
-tPublic directory
<filename>The routing script


An example of router script is:

// router.php
if (preg_match('/\.(?:png|jpg|jpeg|gif)$/', $_SERVER["REQUEST_URI"])) {
    return false;    // serve the requested resource as-is.
}  //the rest of you code goes here.