mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-06 23:02:48 +08:00
app路由检测改进 支持对 根目录 / 访问设置路由
This commit is contained in:
@@ -241,15 +241,16 @@ class Route
|
||||
// 检测域名部署
|
||||
self::checkDomain();
|
||||
|
||||
if (isset(self::$bind['module'])) {
|
||||
// 如果有模块/控制器绑定
|
||||
$url = implode('/', self::$bind['module']) . '/' . $url;
|
||||
}
|
||||
|
||||
// 优先检测是否存在PATH_INFO
|
||||
if (empty($url)) {
|
||||
$url = '/';
|
||||
}
|
||||
|
||||
if (isset(self::$bind['module'])) {
|
||||
$url = implode('/', self::$bind['module']) . '/' . $url;
|
||||
}
|
||||
|
||||
// 分隔符替换 确保路由定义使用统一的分隔符
|
||||
if ('/' != $depr) {
|
||||
$url = str_replace($depr, '/', $url);
|
||||
|
||||
Reference in New Issue
Block a user