This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
<?php
/**
* php artisan serve 路由器(优先于 vendor 内置 server.php)。
*
* 生产构建产物在 public/admin/。若用 file_exists(),目录也会命中并 return false,
* PHP 内置服务器会把 admin/index.html 当目录首页,从而把
* /admin/c/hsxt/login 的 PATH_INFO 改写成 /c/hsxt/login,导致路由 404、页面空白。
* 这里仅对真实文件放行静态资源,其余一律交给 Laravel。
*/
$publicPath = getcwd();
$uri = urldecode(
parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) ?? ''
);
if ($uri !== '/' && is_file($publicPath.$uri)) {
return false;
}
require_once $publicPath.'/index.php';