drjyvoi734793 2017-01-17 13:13
浏览 62
已采纳

在zend框架上重命名文件会引发404页面找不到错误

I have an issue with my zend framework application. I have renamed a file in a folder from add.phtml to ad.phtml and changed the information from where it is referenced like below :

<div class="bottom-margin-less">
     <a href="<?php echo $this->url('customers/default', array('action' => 'ad'), array('force_canonical' => true)); ?>" type="button" class="btn btn-iconed btn-success">
     <i class="icon-plus"></i> 
     <?php echo $this->translate('label_21', null, $this->layout()->lang); ?></a>
</div>

Notice the 'action' => 'ad' it used to be 'action' => 'add'. This throws a 404 error when i rename the file to ad.phtml. Is there anywhere else i have to rename before it works or does zend framework have a different way of renaming files

  • 写回答

2条回答 默认 最新

  • dongpo8702 2017-01-18 14:29
    关注

    You will need to ensure you have updated your action name to match the view. Make sure the addAction has been changed to adAction.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 运筹学中在线排序的时间在线排序的在线LPT算法
  • ¥30 求一段fortran代码用IVF编译运行的结果
  • ¥15 深度学习根据CNN网络模型,搭建BP模型并训练MNIST数据集
  • ¥15 lammps拉伸应力应变曲线分析
  • ¥15 C++ 头文件/宏冲突问题解决
  • ¥15 用comsol模拟大气湍流通过底部加热(温度不同)的腔体
  • ¥50 安卓adb backup备份子用户应用数据失败
  • ¥20 有人能用聚类分析帮我分析一下文本内容嘛
  • ¥15 请问Lammps做复合材料拉伸模拟,应力应变曲线问题
  • ¥30 python代码,帮调试,帮帮忙吧