diff --git a/helper.php b/helper.php index 7db8de1d..726e3ae0 100644 --- a/helper.php +++ b/helper.php @@ -362,14 +362,12 @@ function route($rule = '', $route = [], $type = '*', $option = [], $pattern = [] } /** - * 获取Request参数 - * @param string $name 方法 - * @param mixed $param 参数 - * @return mixed + * 获取当前Request对象实例 + * @return \think\Request */ -function request($name, $param = '') +function request() { - return Request::instance()->$name($param); + return Request::instance(); } /** diff --git a/start.php b/start.php index 17f42442..9ad4264e 100644 --- a/start.php +++ b/start.php @@ -64,5 +64,5 @@ if (APP_HOOK && isset($mode['tags'])) { // 是否自动运行 if (APP_AUTO_RUN) { - App::run(new Request()); + App::run(Request::instance()); }