PHP code example of houdunwang / request

1. Go to this page and download the library: Download houdunwang/request library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

houdunwang / request example snippets


Request::isMethod('post');
判断类型支持 get/post/delete/put类型的判断

Request::query('get.id',0,['intval','trim']);

Request::get('cid',0,'intval'); 
//获取$_GET['cid']值 ,存在时使用intval函数处理,不存在时定义为0

Request::session('uid',0,'intval');