是否有一种正确的方法可以在不丢失当前请求的情况下转发到 sfDoctrineRoute?

发布于 2024-11-05 08:29:59 字数 144 浏览 5 评论 0原文

我想转发(或重定向)到 sfDoctrineRoute 而不会丢失当前请求数据。

我的问题是,当我使用转发时,路由未正确执行,因此 $form->getObject() 之类的东西不起作用。但如果我重定向到该 URL,我就会丢失所有请求数据......

I'd like to forward (or redirect) to an sfDoctrineRoute without losing the current request data.

My issue is that when I use forward, the route isn't executed correctly and so things like $form->getObject() don't work. But if I redirect to the URL, I lose all my request data...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

很酷不放纵 2024-11-12 08:29:59

为什么不通过重定向传递请求参数?

$this->redirect('@someroute?params='.$params);

Why not pass the request params with the redirect?

$this->redirect('@someroute?params='.$params);
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文