Skip to content

afshinakhgar/folderbase-php-router

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Folderbase PHP Router!

AUR

A lightweight and simple object oriented PHP Router. Built by Afshin Akhgar- http://www.akhgar.net

Features

  • Static Route
  • Dynamic Route
  • Parameter Support => akhgar.net/param1/a/param2/b
  • Folder and file and subfolders routing
  • Subrouting
  • Parameter sending over url and query String Support
  • Custom 404 handling
  • Works fine in subfolders

Note:

  • This Library is under development

Demo

  • First of all get the lib
  • Include it in your php index file
  • Call The router go Method
GLOBAL $includePath;
GLOBAL $assetsUrl;
$includePath = '/';
				
require_once './lib/router.php';
$router = new Router();
return $router->go(array(
	'afshin'=>'examples/afshin.php',
	'/'=>'examples/afshin.php',
	'/sub/:param1/:param2/:param3:/param:4'=>'examples/params.php',
));

Parameter

'/sub/:param1/:param2/:param3:/param:4'=>'examples/params.php'

get Parameters with Array ($parameters)

About

php router engine base on folder and files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published