【发布时间】:2022-12-04 00:25:26
【问题描述】:
我在我的 MVC 应用程序中使用 Symfony 的独立 HttpFoundation 组件,并为视图模板(不是 Twig)使用本机 PHP 文件。
控制器中的函数可以成功执行到模板路径的 URL 重定向,如下所示:
return new RedirectResponse('path_to_php_file');
如果我还使用这种语法传递参数,如何在 PHP 文件中检索它们?
return new RedirectResponse('path_to_php_file', 302, array('params' => 'sometext'));
【问题讨论】:
标签: php symfony symfony-http-foundation