mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-05 14:52:47 +08:00
添加表单请求类型伪装支持 默认变量为 _method
This commit is contained in:
@@ -417,7 +417,12 @@ class Request
|
||||
$this->method = $method;
|
||||
return;
|
||||
} elseif (!$this->method) {
|
||||
$this->method = IS_CLI ? 'GET' : (isset($this->server['REQUEST_METHOD']) ? $this->server['REQUEST_METHOD'] : $_SERVER['REQUEST_METHOD']);
|
||||
$mask = $this->param(Config::get('method_var'));
|
||||
if ($mask) {
|
||||
$this->method = $mask;
|
||||
} else {
|
||||
$this->method = IS_CLI ? 'GET' : (isset($this->server['REQUEST_METHOD']) ? $this->server['REQUEST_METHOD'] : $_SERVER['REQUEST_METHOD']);
|
||||
}
|
||||
}
|
||||
return $this->method;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user