Skip to content

Teddy95/EasyRouter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

EasyRouter

EasyRouter is a simple php routing-system.


Benefits

  • Beautiful URL for every page on your website
  • Search Engine Optimization
  • Easy to use in new and existing projects

Installation

Move .htaccess from src into the root directory of your website. After that you have to move the EasyRouter.php from src into one directory of your website.

Important: The .htaccess file redirects to the index.php file, so the code should be written into the index.php file! - Alternatively you can rewrite the .htaccess file!

Now you have to start routing on your website:

<?php
	include('EasyRouter.php');
	EasyRouter\main::start();
?>

or:

<?php
	include('EasyRouter.php');
	$_GET = EasyRouter\main::start(null, null, null, false);
?>

The parameters from your URL are now in the $_GET array.


Documentaion

https://github.com/Teddy95/EasyRouter/wiki


Download


Contributors


License

The MIT License (MIT) - View LICENSE.md