我正在使用带有 WAMP 2.0 的 symfony 1.4 的 setFlash 和 hasFlash 方法
在本地使用我的 frontend_dev 应用程序,一切正常。但是在生产环境中,我的测试$this->forward404Unless($user->hasFlash('resultsArray'));
失败了。
我认为默认情况下启用了 flash 方法。请问我该怎么做才能让它工作?
编辑:我发现了一个有趣的错误信息。
这是我的 filters.yml 文件
# You can find more information about this file on the symfony website:
# http://www.symfony-project.org/reference/1_4/en/12-Filters
rendering: ~
security: ~
# insert your own filters here
cache: ~
flash: ~
execution: ~
在 frontend_prod.log 中,我有:
3 月 16 日 05:57:42 symfony [info] {sfPatternRouting} 匹配路由“主页”(/)为 / 参数数组('module' => 'main', 'action' => 'index',)
05 年 3 月 16 日:57:42 symfony [err] {sfParseException} 配置文件“D:\wamp\bin\php\symfony\symfony14\lib/config/config/filters.yml”指定类别“flash”缺少类键。