1
我在我的引導爲什麼我得到一個靜態路由的路由器錯誤?
public function initRoutes()
{
$router = new Zend_Controller_Router_Rewrite();
$route = new Zend_Controller_Router_Route_Static('register', array('module'=>'members','controller'=>'register','action'=>'index'));
$router->addRoute('register',$route);
}
,當我去http://domain.com/register
我得到這個錯誤:
出現以下錯誤:
exception 'Zend_Controller_Dispatcher_Exception' with message 'Invalid controller specified (register)' in /var/www/html/beta/library/Zend/Controller/Dispatcher/Standard.php:241 Stack trace: #0 /var/www/html/beta/library/Zend/Controller/Front.php(936): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #1 /var/www/html/beta/application/bootstrap.php(24): Zend_Controller_Front->dispatch() #2 /var/www/html/beta/public/index.php(8): require_once('/var/www/html/b...') #3 {main}
在modules /會員
/controllers目錄下有一個RegisterController.php,類別爲Members_RegisterController
我不知道我做錯了,我已經提到了靜態路由手動,似乎這應該工作