symfony redirect with 2 parameters

后端 未结 6 1022
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-08 07:07

how can i redirect to another action passing 2 or more parameters? this code:

$this->redirect(\'input/new?year=\' . $year . \'&month=\' . $month);
         


        
6条回答
  •  北荒
    北荒 (楼主)
    2020-12-08 07:42

    I think this is no normal symfony behavior. Have you defined some routing rules?

    Have you also tried this:

    $this->redirect('module/action?'.http_build_query($paramsArray));
    

提交回复
热议问题