mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-08 15:42:48 +08:00
改进Request类
This commit is contained in:
@@ -420,9 +420,10 @@ class Request
|
|||||||
$this->method = $method;
|
$this->method = $method;
|
||||||
return;
|
return;
|
||||||
} elseif (!$this->method) {
|
} elseif (!$this->method) {
|
||||||
$mask = $this->param(Config::get('var_method'));
|
if (isset($_POST[Config::get('var_method')])) {
|
||||||
if ($mask) {
|
$this->method = strtoupper($_POST[Config::get('var_method')]);
|
||||||
$this->method = $mask;
|
} elseif (isset($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE'])) {
|
||||||
|
$this->method = strtoupper($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE']);
|
||||||
} else {
|
} else {
|
||||||
$this->method = IS_CLI ? 'GET' : (isset($this->server['REQUEST_METHOD']) ? $this->server['REQUEST_METHOD'] : $_SERVER['REQUEST_METHOD']);
|
$this->method = IS_CLI ? 'GET' : (isset($this->server['REQUEST_METHOD']) ? $this->server['REQUEST_METHOD'] : $_SERVER['REQUEST_METHOD']);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user