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:
2026-06-03 10:50:18 +02:00
parent f9652ffed7
commit 5b2864c7d8
+5
View File
@@ -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';