【发布时间】:2013-06-01 15:49:39
【问题描述】:
在我的申请中,我需要申请这种地址:
/film,pokaz,test-name,12.html
其中:'test-name' 是一些文本,'12' 是一些 ID。
这是我的 router.ini:
showmovie.route = film,pokaz,:name,:id.html
showmovie.defaults.controller = movies
showmovie.defaults.action = show
showmovie.defaults.module = default
showmovie.defaults.name = ''
showmovie.defaults.id = ''
但是,url() 助手似乎没有填充这些变量(:name 和:id),所以当我使用它时:
$this->url(array('controller' => 'movies', 'action' => 'show', 'id' => 12, 'name' => 'testmovie'), 'showmovie', true, false);
它给了我这个地址:
/film,pokaz,:name,:id.html
我上面的代码或路由规则有问题吗?
【问题讨论】:
标签: zend-framework url routing helper