首页 > 解决方案 > 层层路由作为 POST?

问题描述

我使用 Laminas 并且在 ControllerAction 函数中我想通过使用重定向到另一个 url 作为帖子$this->redirect()->toRoute('newSite', $noURLParams, $options); 当我使用“查询”-Option ( $options = [$query => ['postPara1' => 'blabla', 'postPara2' => 'blubblub']]) 时,我将在 URL 中将“post”-Parameter 作为 GET-Parameter 获取:

hhttp://localhost/new-site?postPara1=blabla&postPara2=blubblub

这样大家就可以看到参数的内容了。

有没有办法让 toRoute() 从中发出“POST”?还是我必须为此使用另一个功能?

标签: phphttppostlaminas

解决方案


感谢您的关注和帮助。在你说它不起作用之后,我改变了应该调用什么,何时调用的顺序,现在我可以在没有额外重定向的情况下做到这一点。


推荐阅读