PHP code example of tsquare / micro-router
1. Go to this page and download the library: Download tsquare/micro-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/ */
tsquare / micro-router example snippets
square\MicroRouter\Exception\FileNotFoundException;
use Tsquare\MicroRouter\Exception\InvalidPathException;
use Tsquare\MicroRouter\MicroRouter;
try {
$router = new MicroRouter(dirname(__FILE__, 2) . '/templates');
// Prefix the
$router->