This commit is contained in:
thinkphp
2019-01-11 14:46:24 +08:00
parent 4a4b5e64fa
commit 7c1b587eb9

View File

@@ -526,6 +526,8 @@ class Request
if (in_array($method, ['GET', 'POST', 'DELETE', 'PUT', 'PATCH'])) { if (in_array($method, ['GET', 'POST', 'DELETE', 'PUT', 'PATCH'])) {
$this->method = $method; $this->method = $method;
$this->{$this->method}($_POST); $this->{$this->method}($_POST);
} else {
$this->method = 'POST';
} }
} elseif (isset($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE'])) { } elseif (isset($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE'])) {
$this->method = strtoupper($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE']); $this->method = strtoupper($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE']);