router.php line 14

Open in your IDE?
  1. <?php
  2. $publicDir = __DIR__ . '/public';
  3. $path = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
  4. $file = realpath($publicDir . $path);
  5. if ($file !== false && is_file($file) && str_starts_with($file, realpath($publicDir))) {
  6.     return false;
  7. }
  8. $_SERVER['SCRIPT_NAME'] = '/index.php';
  9. $_SERVER['SCRIPT_FILENAME'] = $publicDir . '/index.php';
  10. require $publicDir . '/index.php';