Added check for php server.
Added an if check that allows the built-in PHP server to serve existing files directly. On a server it's handled by nginx, purely for ease of development.
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
// For server.sh and php -S localhost
|
||||
if (PHP_SAPI === 'cli-server' && is_file(__DIR__ . parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
define('ROOT', __DIR__);
|
||||
require ROOT . '/src/bootstrap.php';
|
||||
require ROOT . '/src/router.php';
|
||||
|
||||
Reference in New Issue
Block a user