1. Go to this page and download the library: Download kiss-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/ */
kiss-php / router example snippets
apache
RewriteEngine On
# Never execute PHP files from public
RewriteRule ^public/.*\.php$ index.php [L,QSA,NC]
# Serve public non-PHP files directly
RewriteCond %{REQUEST_URI} !\.php$ [NC]
RewriteCond %{DOCUMENT_ROOT}/public%{REQUEST_URI} -f
RewriteRule ^(.+)$ public/$1 [L]
RewriteCond %{REQUEST_URI} !^/index\.php$
RewriteRule ^ index.php [L,QSA]