当前位置: 首页 > 文档资料 > Group-Co 开发文档 >

基础服务 - Request请求类

优质
小牛编辑
133浏览
2023-12-01

Request

参照symfony2的Request服务

  • GET {#get}
  1. public function testAction(Request $request)
  2. {
  3. //get
  4. $request -> query -> get('xxx');
  5. $request -> query -> all();
  6. }
  • POST {#post}
  1. public function testAction(Request $request)
  2. {
  3. //post
  4. $request -> request -> get('xxx');
  5. $request -> request -> all()
  6. }
  • FILE {#file}
  1. public function testAction(Request $request)
  2. {
  3. //file
  4. $request -> file -> get('xxxx');
  5. }