19 lines
425 B
PHP
19 lines
425 B
PHP
|
|
<?php
|
||
|
|
declare(strict_types=1);
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Router für den lokalen Entwicklungsserver:
|
||
|
|
* php -S 127.0.0.1:8099 -t . tools/router.php
|
||
|
|
*/
|
||
|
|
|
||
|
|
$path = (string) parse_url($_SERVER['REQUEST_URI'] ?? '/', PHP_URL_PATH);
|
||
|
|
if ($path === '/install.php') {
|
||
|
|
require __DIR__ . '/../install.php';
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
$file = __DIR__ . '/..' . $path;
|
||
|
|
if ($path !== '/' && is_file($file)) {
|
||
|
|
return false;
|
||
|
|
}
|
||
|
|
require __DIR__ . '/../index.php';
|