mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
改进Response类的send方法 去除 REQUEST_METHOD IS_GET IS_POST IS_PUT IS_DELETE IS_AJAX __EXT__ 常量 由应用自己定义
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
namespace think;
|
||||
|
||||
use think\Input;
|
||||
use think\Request;
|
||||
|
||||
class Validate
|
||||
{
|
||||
@@ -684,7 +685,8 @@ class Validate
|
||||
*/
|
||||
protected function method($value, $rule)
|
||||
{
|
||||
return REQUEST_METHOD == strtoupper($rule);
|
||||
$method = Request::instance()->method();
|
||||
return $method == strtoupper($rule);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user