zend 框架中的链接多个路由
我怎样才能让这两条路线(语言,amdin)起作用..单独管理,或者语言可以工作,但一起它们就会失败:(
; Admin route
resources.router.routes.admin.type = Zend_Controller_Router_Route
resources.router.routes.admin.route = ":admin"
resources.router.routes.admin.reqs.admin = "admin"
; Language route
resources.router.routes.language.type = Zend_Controller_Router_Route
resources.router.routes.language.route = ":language"
resources.router.routes.language.reqs.language = "^(nl|en)$"
resources.router.routes.language.defaults.language = "nl"
; Default route chain
resources.router.routes.default.type = Zend_Controller_Router_Route_Chain
resources.router.routes.default.chain = "language, admin, defaultmodule"
How can I get these 2 routes (languages, amdin) to work.. alone admin, or language will work but together they will fail :(
; Admin route
resources.router.routes.admin.type = Zend_Controller_Router_Route
resources.router.routes.admin.route = ":admin"
resources.router.routes.admin.reqs.admin = "admin"
; Language route
resources.router.routes.language.type = Zend_Controller_Router_Route
resources.router.routes.language.route = ":language"
resources.router.routes.language.reqs.language = "^(nl|en)$"
resources.router.routes.language.defaults.language = "nl"
; Default route chain
resources.router.routes.default.type = Zend_Controller_Router_Route_Chain
resources.router.routes.default.chain = "language, admin, defaultmodule"
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
嗯,当然。
这些路线是重叠的,尽管它们应该是不同的。
Well, of course.
These routes are overlapping, while they should have been different.