1. Go to this page and download the library: Download dvaknheo/swoolehttpd 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/ */
dvaknheo / swoolehttpd example snippets
use SwooleHttpd\SwooleHttpd;
hello ,have a good start.</h1><pre>\n";
var_export($_SERVER,$_GET,$POST,$_REQUEST,$_COOKIE, $_SESSION);
echo "</pre>";
return true;
}
$options=[
'port'=>9528,
'http_handler'=>'hello',
];
SwooleHttpd::RunQuickly($options);