PHP code example of koriym / php-server

1. Go to this page and download the library: Download koriym/php-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/ */

    

koriym / php-server example snippets


$server = new PhpServer('127.0.0.1:8080', 'path/to/index.php');
$server->start();

// your http test here

$server->stop();

$server = new PhpServer('127.0.0.1:8080', 'path/to/public');