thinkphp request 和 param 的区别

thinkphp 5的param不是一般的强大。

param  是thinkphp自己写的类型,自动判断是什么类型的数据 就行接收。
无论什么类型都可以接受,包括php://input 这种原生数据流

客户端POST签名信息到服务端(签名后用&串联)


namespace app\index\controller;
use think\Request;

class Index
{
    public function index(Request $request)
    {
	$p=$request->param();
        return $p;				
    }
}

返回来的值已经格式化好了。牛!

你可能感兴趣的:(thinkphp)