Skip to content
TIGERB edited this page May 21, 2017 · 2 revisions
  • 获取get参数:
App::$container->getSingle('request')->get('username', 'default value');
  • 获取post参数:
App::$container->getSingle('request')->post('param', 'default value');
  • 获取request参数:
App::$container->getSingle('request')->request('param', 'default value');
  • 获取所有参数:
App::$container->getSingle('request')->all();
  • 获取server参数:
App::$container->getSingle('request')->server('param');
  • 获取env环境参数:
App::$container->getSingle('request')->env('param');
Clone this wiki locally