Last active
October 18, 2017 07:39
-
-
Save iksi/678171044b6a7823f9433d71a9dbe10c to your computer and use it in GitHub Desktop.
Let all other requests than file get passed to the script on duty. Use with `php -S localhost:8888 server.php`.
This file contains hidden or 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 | |
if (file_exists($_SERVER['DOCUMENT_ROOT'] . $_SERVER['REQUEST_URI'])) return false; | |
$_SERVER['SCRIPT_NAME'] = DIRECTORY_SEPARATOR . 'index.php'; | |
require_once $_SERVER['DOCUMENT_ROOT'] . $_SERVER['SCRIPT_NAME']; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment