use think\Request;
class Name
{
$request = Request::instance();
$method = $request->method();//获取上传方式
$request->param();//获取所有参数,最全
$get = $request->get();获取get上传的内容
$post = $request->post();获取post上传的内容
$request->file('file')获取文件
}
或者
use think\Controller;
class Name
{
$method = $this->request->method();//获取上传方式
$this->request->param();//获取所有参数,最全
$get = $this->request->get();获取get上传的内容
$post = $this->request->post();获取post上传的内容
$this->request->file('file')获取文件
}
网友评论