Getting $_GET parameters from route in Zend Framework 2

后端 未结 3 1440
醉酒成梦
醉酒成梦 2021-02-09 04:40

Zend Framework 1 had a very simple way of parsing URL routes and setting found params in the $_GET superglobal for easy access. Sure, you could use ->getParam($something) inside

3条回答
  •  长情又很酷
    2021-02-09 05:33

    You could use in your controlller:

     $paramValue = $this->params()->fromQuery('your_param_here');
    

    Regards

提交回复
热议问题