Files
miniPHP/index.php
T
jasonhilder 5b2864c7d8 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.
2026-06-03 10:50:18 +02:00

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';