Lint / PHP (phpcs PSR-12) (push) Successful in 33s
Lint / JS (eslint) (push) Successful in 13s
Lint / PHP requirements (version + extensions) (push) Successful in 56s
Lint / Notify on failure (push) Skipped
Security / PHP Security (semgrep) (push) Successful in 2m14s
Lint / Deploy (push) Successful in 3s
17 lines
456 B
PHP
17 lines
456 B
PHP
<?php
|
|
|
|
/**
|
|
* 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;
|
|
}
|
|
|
|
chdir(__DIR__ . '/tinker');
|
|
require __DIR__ . '/tinker/index.php';
|