From 38f343f69fa5395408262ed3184f33a8deb32078 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Tue, 24 May 2016 11:53:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9BRequest=E7=B1=BB=E7=9A=84meth?= =?UTF-8?q?od=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Request.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/library/think/Request.php b/library/think/Request.php index 6e032c21..3aff5d89 100644 --- a/library/think/Request.php +++ b/library/think/Request.php @@ -410,8 +410,7 @@ class Request */ public function method() { - $method = isset($this->server['REQUEST_METHOD']) ? $this->server['REQUEST_METHOD'] : $_SERVER['REQUEST_METHOD']; - return IS_CLI ? 'GET' : $method; + return IS_CLI ? 'GET' : (isset($this->server['REQUEST_METHOD']) ? $this->server['REQUEST_METHOD'] : $_SERVER['REQUEST_METHOD']); } /**