PHP PHP Built in server

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Insert
> Step 2: And Like the video. BONUS: You can also share it!

Introduction

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

Parameters

ColumnColumn
-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

Remarks

An example of router script is:

<?php
// 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.


Got any PHP Question?