Download the PHP package houdunwang/request without Composer

On this page you can find all versions of the php package houdunwang/request. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package request

响应组件

介绍

Request服务是用于获取请求数据与对请求终端设备进行判断的服务。

使用 Request 组件前必须先行配置 Session组件Cookie组件,请参考GitHub文档进行参考

[TOC]

开始使用

安装组件

使用 composer 命令进行安装或下载源代码使用。

HDPHP 框架已经内置此组件,无需要安装

启动组件

常量定义

组件会定义一些常量

判断请求类型

获取数据

query 方法支持点语法操作,支持多层数据获取。第一个字符为数据类型。

不存在时返回默认值

返回默认值指当数据不存在时返回设置的值,并不会更改原数据。 以下示例当 $_GET['id']不存在时返回默认值9

对数据函数处理

query 方法的第三个参数是一个函数名组成的数组,将对获取的数据通过函数进行处理后返回。

根据类型获取

系统支持使用 get,post,request,server,session,cookie,global获取同名的php全局变量数据。

获得所有 $_GET 数据
获得所有 $_POST 数据
获得POST变量并对数据执行函数处理
获得POST变量, 不存时返回默认值
获得 $_SESSION['uid'] 值,并执行intval方法
获得 $_COOKIE['cart'] 值

设置

使用set 方法可以为$_GET,$_POST,$_REQUEST,$_SERVER设置数据,支持点语法设置多层数据,第一个参数为数据类型。 以下代码设置GET['a']['b'] 变量为后盾人

获取客户端IP地址

https请求检测

判断是否为手机访问

检测是否为微信客户端

判断请求来源是否为本站域名


All versions of request with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
houdunwang/session Version ~1.0
houdunwang/cookie Version ~1.0
houdunwang/arr Version ~1.0
houdunwang/tool Version ~1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package houdunwang/request contains the following files

Loading the files please wait ....