2026-10-03 01:02:55 -04:00
|
|
|
<?php
|
2026-10-03 16:58:52 -04:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Router script for PHP's built-in web server, used only for the local screenshot demo.
|
|
|
|
|
* Serves real static files directly and sends everything else to the application's index.php.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
$path = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
|
|
|
|
|
$file = __DIR__ . '/tinker' . $path;
|
|
|
|
|
|
|
|
|
|
if ($path !== '/' && is_file($file) && !str_ends_with($file, '.php')) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2026-10-03 01:02:55 -04:00
|
|
|
chdir(__DIR__ . '/tinker');
|
|
|
|
|
require __DIR__ . '/tinker/index.php';
|