Skip to content

R3IDV3/router

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

router

This is a simple PHP routing class. This is a scalable project, it's meant to be something you can just drop right into your site and use, but it's also meant to be a good foundation for building and understanding routing systems.

Getting Started

  1. Make sure you're using this on a server which supports PHP!
    If you need to install a server on your local machine, try MAMP.
  2. Place index.php, router.php, and .htaccess in the directory which you wish to route.
  3. An instance of router is initialized in index.php with an array containing the routes by using this syntax:
new Router(array(
	'/path-to-route' => 'file-to-route-to.php',
	'/another-path-to-route' => 'another-file-to-route-to.php',
	// etc
));

It's that simple!

About

A simple PHP routing class

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors