PHP code example of jsonrai277 / json-php-router
1. Go to this page and download the library: Download jsonrai277/json-php-router 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/ */
jsonrai277 / json-php-router example snippets
use JsonRai277\PhpRouter\Router;
php');
Router::get('/', 'home.php');
Router::get('/', function () {
echo 'This is the home page.';
});
function homePage() {
return 'This is the home page.';
}
Router::get('/', 'homePage');
bash
composer