PHP code example of wherd / http
1. Go to this page and download the library: Download wherd/http 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/ */
wherd / http example snippets
use Wherd\Http\Kernel;
use Wherd\Http\Router;
use Wherd\Http\Request;
use Wherd\Http\Response;
// ...
$router = new Router();
$router->addRoutes(/* ... */);
$kernel = new Kernel();
$kernel->register($router);
$kernel->dispatch(new Request, new Response)->send();