From 3cb9c65c7a054708ad42b41d7cb170710baa56bc Mon Sep 17 00:00:00 2001 From: thinkphp Date: Wed, 11 May 2016 12:32:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3request=E5=87=BD=E6=95=B0?= =?UTF-8?q?=E5=92=8Cstart=E5=85=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- helper.php | 10 ++++------ start.php | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) 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()); }