优化安装报错问题
This commit is contained in:
@@ -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/post,post 优先)
|
||||
* @param string|null $name 参数名,null 返回全部
|
||||
|
||||
Reference in New Issue
Block a user