优化安装报错问题

This commit is contained in:
2026-04-10 10:37:19 +08:00
parent 9b039b7abe
commit aede7248ca
8 changed files with 58 additions and 17 deletions

View File

@@ -35,6 +35,18 @@ class Request extends \Webman\Http\Request
return $path;
}
/**
* 入口为 /index.php/... 时返回 /index.php用于拼接后台/前台完整 URL与路由 path() 剥离规则对应)
*/
public function publicBasePath(): string
{
$path = parent::path();
if (str_starts_with($path, '/index.php')) {
return '/index.php';
}
return '';
}
/**
* 获取请求参数(兼容 ThinkPHP param合并 get/postpost 优先)
* @param string|null $name 参数名null 返回全部