好的,我對此很新,翻遍所有的教程並回答了我可以找到的問題。不幸的是,我一直無法找到一個完全適合我的application.ini。Zend Framework application.ini路由器問題
某處我必須塞滿 - 我可以使基本路由工作正常,但只要我嘗試添加一個變量,我就無法使其工作。所以/ guide-to工作,但/ guide-to/london給出錯誤「某處未指定」
我正在做所有的application.ini路由。這是我的文件:
[production]
phpSettings.display_startup_errors = 0
phpSettings.display_errors = 0
includePaths.library = APPLICATION_PATH "/../library"
bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"
appnamespace = "Application"
resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
resources.frontController.params.displayExceptions = 1
resources.layout.layoutPath = APPLICATION_PATH "/views/layouts/"
resources.layout.layout = wrapper
resources.view = ""
resources.router.routes.home.route = "/stuff"
resources.router.routes.home.defaults.module = default
resources.router.routes.home.defaults.controller = index
resources.router.routes.home.defaults.action = index
resources.router.routes.guide-to.route = "/guide-to"
resources.router.routes.guide-to.defaults.controller = "destination"
resources.router.routes.guide-to.defaults.action = "guide-to"
resources.router.routes.place.route = "guide-to/:someplace"
resources.router.routes.place.defaults.controller = "destination"
resources.router.routes.place.defaults.action = "guide-to"
resources.router.routes.guides.route = "/guiderrrs"
resources.router.routes.guides.defaults.controller = destination
resources.router.routes.guides.defaults.action = guiderrrs
resources.router.routes.guidez.route = "/guidez"
resources.router.routes.guidez.defaults.controller = destination
resources.router.routes.guidez.defaults.action = guidez
pagination.item.count.per.page = 10
[staging : production]
[testing : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1
[development : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1
resources.frontController.params.displayExceptions = 1
任何人都可以發現問題嗎?還是有人有一個可以共享的工作application.ini?
所有貢獻感激地收到!
有一點需要注意路線「路線匹配的順序相反,因此請確保您的最通用路線是首先定義的」。我不認爲這是你的問題,但我不知道,因爲我不知道,如果最高路線是第一或最後:) – RockyFord 2012-04-01 11:07:20