5b2864c7d8
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.
11 lines
291 B
PHP
Executable File
11 lines
291 B
PHP
Executable File
<?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';
|