作用 |
代码 |
是否为 GET 请求 |
if (Request::instance()->isGet()) |
是否为 POST 请求 |
if (Request::instance()->isPost()) |
是否为 PUT 请求 |
if (Request::instance()->isPut()) |
是否为 DELETE 请求 |
if (Request::instance()->isDelete()) |
是否为 Ajax 请求 |
if (Request::instance()->isAjax()) |
是否为 Pjax 请求 |
if (Request::instance()->isPjax()) |
是否为手机访问 |
if (Request::instance()->isMobile()) |
是否为 HEAD 请求 |
if (Request::instance()->isHead()) |
是否为 Patch 请求 |
if (Request::instance()->isPatch()) |
是否为 OPTIONS 请求 |
if (Request::instance()->isOptions()) |
是否为 cli |
if (Request::instance()->isCli()) |
是否为 cgi |
if (Request::instance()->isCgi()) |