Query route deprecated as of ZF 2.1.4; use the "query" option of the HTTP router's assembling method instead

在ZF2的2.1.4版本中不建议使用query路由, 如何传递query参数呢?

例如:

$this->url = $this->url()->fromRoute('storeslHome', array('controller'=>'order', 'action'=>'statistics'), array('query'=>$this->params()->fromQuery()));
//第三个参数就是传递get参数的了

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注