initial commit
This commit is contained in:
commit
3f64f4a49a
221 files changed
+26665
No files matched your search
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* Роутер встроенного сервера PHP (php -S, команда `proton serve`).
|
||||
*
|
||||
* Существующие файлы отдаём как есть, остальное уводим в index.php — так
|
||||
* встроенный сервер ведёт себя как nginx с try_files. На бою этот файл не нужен.
|
||||
*/
|
||||
|
||||
$path = (string) parse_url((string) ($_SERVER['REQUEST_URI'] ?? '/'), PHP_URL_PATH);
|
||||
$file = __DIR__ . $path;
|
||||
|
||||
if ($path !== '/' && is_file($file)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
require __DIR__ . '/index.php';
|
||||
Reference in new issue
Block a user