【发布时间】:2015-07-18 20:36:43
【问题描述】:
我的控制器刚刚处理完一个表单,并且
if ($form->isValid())
{
// Persist my data.
// ...
// Now move on to the next page.
return $this->redirectToRoute('page2');
}
但我想使用 POST 将变量传递给该页面。 IE。类似于:
$this->redirectToRoute('page2', array('state' => 'wonderful'));
这显然会将它作为 GET 参数传递。人们建议使用redirect 307s and forwarding,但他们只是转发当前请求。我需要做的是使用我的任意消息创建一个新请求。我怎样才能做到这一点?
【问题讨论】:
标签: php symfony post controller