PHP code example of bhittani / web-server

1. Go to this page and download the library: Download bhittani/web-server library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

bhittani / web-server example snippets




erver = new \Bhittani\WebServer\Php('/path/to/www/public/index.php');



$webServer->path('/path/to/www/public');



$webServer->host('127.0.0.1');



$webServer->port(3000);



$webServer->url('https://localhost');



$webServer->start();



$webServer->stop();



$webServer->isRunning();



$webServer->getPath();



$webServer->getUrl();