Created
May 16, 2011 13:44
-
-
Save lleitep3/974456 to your computer and use it in GitHub Desktop.
by default, I always keep the page as the first parameter of the uri.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$uriPath = parse_url ($_SERVER['REQUEST_URI'], PHP_URL_PATH); | |
$uriPath = explode('/', trim($uriPath, '/') ); | |
$page = reset($uriPath); | |
require $page . '.php'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment