Helpers\Request

The Helpers\Request class is used for detecting the type of request and retrieving the request.

getMethod()

Request::getMethod()

Returns either GET or POST, depending if a $_GET request or a $_POST request has happened.

getIpAddress()

Request::getIpAddress()

Returns the client's IP Address.

post()

Request::post($key)

Returns the post key.

get()

Request::get($key)

Returns the get key.

server()

Request::server($key)

Returns the server key.

headers()

Request::headers($key)

Returns the HTTP Request Headers key.

files()

Request::files($key)

Returns the file key.

put()

Request::put($key)

Returns the put key.

isAjax()

Request::isAjax()

Detect if the request is a ajax request.

isPost()

Request::isPost()

Detect if the request is a post request.

isGet()

Request::isGet()

Detect if the request is a get request.

isHead()

Request::isHead()

Detect if the request is a head request.

isPut()

Request::isPut()

Detect if the request is a put request.

isDelete()

Request::isDelete()

Detect if the request is a delete request.

isOptions()

Request::isOptions()

Detect if the request is an options request.

Helpers\Request的更多相关文章

  1. 快速搭建react项目骨架(按需加载、redux、axios、项目级目录等等)

    一.前言 最近整理了一下项目骨架,顺便自定义了一个脚手架,方便日后使用.我会从头开始,步骤一步步写明白,如果还有不清楚的可以评论区留言.先大致介绍一下这个骨架,我们采用 create-react-ap ...

  2. elasticsearch.helpers.ScanError: Scroll request has only succeeded on xx shards

    # 当index=''为空时出现此错误

  3. Helpers\SimpleCurl

    Helpers\SimpleCurl The SimpleCurl class is there to curl data from RESTful services. A lot of compan ...

  4. Helpers\RainCaptcha

    Helpers\RainCaptcha This class can validate CAPTCHA images with RainCaptcha. It can generate an URL ...

  5. Helpers\CSRF

    Helpers\CSRF CSRF Protection The CSRF helper is used to protect post request from cross site request ...

  6. pytest 12 函数传参和fixture传参数request

    前沿: 有的case,需要依赖于某些特定的case才可以执行,比如,登陆获取到的cookie,每次都需要带着他,为了确保是同一个用户,必须带着和登陆获取到的同一个cookies. 大部分的用例都会先登 ...

  7. Go 语言相关的优秀框架,库及软件列表

    If you see a package or project here that is no longer maintained or is not a good fit, please submi ...

  8. YII2中的Html助手和Request组件

    Html助手 1 .在@app\views\test的index.php中: <?php //引入命名空间 use yii\helpers\Html; ?> <?php //[一]表 ...

  9. Yii2 配置request组件解析 json数据

    在基础版本的config目录下 web.php 或者高级版config目录下的main.php中配置 'components' =>[ 'request' => [ 'parsers' = ...

随机推荐

  1. Windows安装pomelo过程

    安装总要出点状况的.操作系统是win7 64bit. 为了保证顺利,打开的是VS2012命令行提示.运行 npm install -g pomelo 经过一系列输出,最后安装提示完成了.但是输入 po ...

  2. 用Python操作Mysql

    平时的主要编程语言是Java,开发时也主要用Mysql,经常为了测试,调试的目的需要操作数据库,比如备份,插入测试数据,修改测试数据,有些时候不能简单的用SQL就能完成任务,或都很好的完成任务,用Ja ...

  3. ThinkPHP中U方法与url的四种访问模式

     ThinkPHP中U方法的用处主要是完成对url地址的组装,在模板中使用U方法而不是固定写死URL地址的好处在于,一旦你的环境变化或者参数设置改变,你不需要更改模板中的任何代码.在模板中的调用格式需 ...

  4. CentOS6.2编译安装codelite5.3

    这两天实验室要求在服务器上安装一个codelite,于是由我对服务器下手,上网看了下悲剧的发现codelite不支持在centos上直接安装,只能编译安装,经过一番折腾之后,成功的装上了,下面是我的安 ...

  5. C++ 我想这样用(七)

    话接前篇,继续基于对象编程语法的剩余部分: 6.类的const成员函数和const对象 const数据成员:跟const常量一样,只是一个在类里(而且是在构造函数里),一个在类外而已,都必须初始化. ...

  6. Makefile 知识点

    $@ $@ is the name of the target. $? The $? macro stores the list of dependents more recent than the ...

  7. HDU 4950 Monster (水题)

    Monster 题目链接: http://acm.hust.edu.cn/vjudge/contest/123554#problem/I Description Teacher Mai has a k ...

  8. 【转】有向图强连通分量的Tarjan算法

    原文地址:https://www.byvoid.com/blog/scc-tarjan/ [有向图强连通分量] 在有向图G中,如果两个顶点间至少存在一条路径,称两个顶点强连通(strongly con ...

  9. MSSQL导入数据时,出现“无法截断表 因为表正由Foreign key引用”错误

    * 错误 0xc002f210: 准备 SQL 任务: 执行查询“TRUNCATE TABLE [dsc100552_db].[dbo].[ALV_SalesBigClass] ”失败,错误如下:“无 ...

  10. PC 端微信扫码注册和登录

    一.前言 先声明一下,本文所注重点为实现思路,代码及数据库设计主要为了展现思路,如果对代码效率有着苛刻要求的项目切勿照搬. 相信做过微信开发的人授权这块都没少做过,但是一般来说我们更多的是为移动端的网 ...