dqy006150 2017-04-04 14:05
浏览 27
已采纳

symfony路线改变没有生效

this is my controller:

/**
 * \brief Change Password of currently logged in user

 * @Route("/changePw", name="changePw" )
 * @Template()
 */
public function changePwAction(Request $req)
{
    //controller code here
}

When I change the line

* @Route("/changePw", name="changePw" )

to:

* @Route("/changePw2", name="changePw2" )

This change does not take effect and the page still loads from /changePw

I thought that might be cache. So I tried:

php app/console cache:clear --env=dev

which didn't help either. It seems to be something obvious, but as I'm new to symfony I can not figure it out.

  • 写回答

1条回答 默认 最新

  • dopnpoh056622 2017-04-05 05:56
    关注

    You should not need to clear the dev cache for routing changes, if you are accessing the site using the app.php however and not app_dev.php then you will need to clear the prod cache for this to work. php app/console cache:clear --env=prod

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog
  • ¥15 Excel发现不可读取的内容