0
我想航線從控制器到自定義路由路由到Custome航線
我做一個自定義路由
$reportRoute = new Zend_Controller_Router_Route('blogs/blog_id/:blog_id', array('module' => 'blogs', 'controller' => 'blog', 'action' => 'index','blog_id' =>NULL));
$routesArray = array('blogs' => $reportRoute);
$router->addRoutes($routesArray);
,我想從控制器到 索引頁讓rediorection我作出這樣,但它不起作用
$this->_helper->redirector->gotoRoute(array('module' => 'blogs', 'controller' => 'blog', 'action' => 'index', 'blog_id' => $this->blog_id));
嘗試此:$這 - > _ helper-> redirector-> gotoRoute(陣列( 'blog_id'=> $這個 - > blog_id), '博客'); – 2012-04-02 08:03:20