Created
October 7, 2012 15:50
-
-
Save markuspoerschke/3848725 to your computer and use it in GitHub Desktop.
Simple router.php for using the PHP 5.4 built-in webserver
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 | |
// Filename of requested file... | |
$requested = __DIR__ . $_SERVER['REQUEST_URI']; | |
// If file exists use file | |
if (file_exists($requested) && !is_dir($requested)) { | |
return false; | |
} | |
// Fallback | |
include 'app.php'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment