From a95e27a7f421d0f9090cdbdebb884c1c71eb255c Mon Sep 17 00:00:00 2001 From: thinkphp Date: Mon, 5 Sep 2016 18:03:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- helper.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/helper.php b/helper.php index 75da2e9b..952a77dc 100644 --- a/helper.php +++ b/helper.php @@ -18,6 +18,8 @@ use think\Config; use think\Cookie; use think\Db; use think\Debug; +use think\exception\HttpException; +use think\exception\HttpResponseException; use think\Lang; use think\Loader; use think\Log; @@ -497,7 +499,7 @@ if (!function_exists('redirect')) { $params = []; } $response = Response::create($url, 'redirect', $code)->params($params); - throw new \think\exception\HttpResponseException($response); + throw new HttpResponseException($response); } } @@ -511,9 +513,9 @@ if (!function_exists('abort')) { function abort($code, $message = null, $header = []) { if ($code instanceof Response) { - throw new \think\exception\HttpResponseException($code); + throw new HttpResponseException($code); } else { - throw new \think\exception\HttpException($code, $message, null, $header); + throw new HttpException($code, $message, null, $header); } } } @@ -526,7 +528,7 @@ if (!function_exists('halt')) { function halt($var) { dump($var); - throw new \think\exception\HttpResponseException(new Response); + throw new HttpResponseException(new Response); } }