From 412094d049a0c9946793290ec6937fb812bcaad9 Mon Sep 17 00:00:00 2001 From: huangdijia Date: Mon, 15 Feb 2016 14:25:18 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=96=E6=B6=88cli=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E4=B8=8B=E5=AD=90=E5=9F=9F=E5=90=8D=E6=94=AF=E6=8C=81=20?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3app=E4=B8=80=E5=A4=84notice?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/App.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/think/App.php b/library/think/App.php index d87c268d..cb5d3952 100644 --- a/library/think/App.php +++ b/library/think/App.php @@ -126,7 +126,7 @@ class App { if (empty($vars)) { // 自动获取请求变量 - switch ($_SERVER['REQUEST_METHOD']) { + switch (REQUEST_METHOD) { case 'POST': $vars = array_merge($_GET, $_POST); break; @@ -363,7 +363,7 @@ class App Route::register($config['route']); } // 路由检测(根据路由定义返回不同的URL调度) - $result = Route::check($_SERVER['PATH_INFO'], $depr, $config['url_domain_deploy']); + $result = Route::check($_SERVER['PATH_INFO'], $depr, !IS_CLI ? $config['url_domain_deploy'] : false); if (false === $result && $config['url_route_must']) { // 路由无效 throw new Exception('route not define ');