From a7b2dbe86fedf97a5d96b8d794d4e98b52b8347c Mon Sep 17 00:00:00 2001 From: thinkphp Date: Tue, 31 May 2016 13:24:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9BRequest=E7=B1=BBmethod?= =?UTF-8?q?=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 | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/library/think/Request.php b/library/think/Request.php index 41af2323..579ca74e 100644 --- a/library/think/Request.php +++ b/library/think/Request.php @@ -408,7 +408,7 @@ class Request /** * 当前的请求类型 * @access public - * @param string $method 请求类型 + * @param bool $method true 获取原始请求类型 * @return string */ public function method($method = '') @@ -416,9 +416,6 @@ class Request if (true === $method) { // 获取原始请求类型 return IS_CLI ? 'GET' : (isset($this->server['REQUEST_METHOD']) ? $this->server['REQUEST_METHOD'] : $_SERVER['REQUEST_METHOD']); - } elseif ($method) { - $this->method = $method; - return; } elseif (!$this->method) { if (isset($_POST[Config::get('var_method')])) { $this->method = strtoupper($_POST[Config::get('var_method')]);