【发布时间】:2013-12-09 14:02:45
【问题描述】:
我有一个链接可以转到更新屏幕,并且在更新屏幕中有一个后退按钮来加载索引。
*当前 url 是 * http://sample.com/demoZend/public/index/ 当我点击一个帖子时,我会把它带到这个 URL,http://sample.com/demoZend/public/index/update/id/1
现在这个视图中有一个按钮可以返回到index。
<?php
$this->title = "Update post";
$this->headTitle('Update Post');
echo $this->form;
?>
<a href="<?php echo $this->url(array('controller'=>'index', 'action'=>'index')); ?>">Go Back</a>
问题是,当点击后退按钮时,这里是http://sample.com/demoZend/public/index/index/id/1 而不是http://sample.com/demoZend/public/index/index/
这个参数 id 仍然存在。 id/1 如何删除此参数并使 url 成为 public/index/index/
我是 zend 框架的新手。所以对于使用 zend 的人来说,这一定是一件小事。
【问题讨论】:
标签: php zend-framework