PHP code example of openlss / lib-url
1. Go to this page and download the library: Download openlss/lib-url 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/ */
openlss / lib-url example snippets
use \LSS\Url;
//registration
Url::_register('home',Url::_prep().'/index.php');
Url::_register('myapp',Url::home().'?act=myapp');
Url::_register('myapp_create',Url::myapp().'&do=create');
Url::_register('myapp_edit',Url::myapp().'&do=edit&id=$1');
//usage
$url = Url::home();
$url = Url::myapp();
$url = Url::myapp_create();
$url = Url::myapp_edit($id);