在 application\modules\admin\layouts\scripts\layout.phtml
<?php echo $this->url(array('action'=>'logout','controller'=>'user','module'=>'admin'),null,true);?>
当我访问 zfmul/public/admin-cate/ 时,它返回
/zfmul/public/admin-cate/logout
但是当我访问 zfmul/public/admin/categories 时,它返回
/zfmul/public/admin/user/logout
并且这两个 url 被渲染到同一个模块、同一个控制器、同一个动作,我想知道为什么它会返回不同的结果?
我在application.ini中做了一些配置,
resources.router.routes.admincategories.route = "admin-cate/:action/:id"
resources.router.routes.admincategories.defaults.module = "admin"
resources.router.routes.admincategories.defaults.controller = "categories"
resources.router.routes.admincategories.defaults.action = "index"
resources.router.routes.admincategories.reqs.action = "save|edit|index|new"
resources.router.routes.admincategories.defaults.id = "1"
resources.router.routes.admincategories.reqs.id = "\d+"