拽拽
管理员组

THINKPHP获取输入的变量 自定义方法get_all_input

//获取参数方法

function get_all_input($t=''){

    $inout_1 =input('param.',[]);

    $inout_2 =input('request.',[]);

    if(!empty($t)){

        $input_3 =json_decode(file_get_contents('php://input'),true);

        if(!is_array($input_3)) $input_3 =array();

    }

    if(empty($inout_1)&&empty($inout_2)&&empty($input_3)) return array();

    $data = array_merge($inout_1,$inout_2);

    if(count($data)){

        $data=array_remove($data,'sign');

        $data=array_remove($data,'timestamp');

        $data=array_remove($data,'randomstr');


#1楼
发帖时间:2019-3-16   |   查看数:0   |   回复数:0
游客组