내가 이렇게 내 PROJ 에 대한 3 모듈을 만들 :catch되지 않은 예외'Zend_Controller_Dispatcher_Exception는 '
응용 프로그램/모듈/관리자
응용 프로그램/모듈/기본
응용 프로그램/모듈/오류
모든 모듈 자체에는 제어기,보기, 레이아웃 폴더가 있습니다. 모든 일이 기본 모듈 올바른지,하지만 난 관리 모듈에 갈 때 나는이 오류를 (www.domain.com/public/admin)를 보았다
Fatal error: Uncaught exception 'Zend_Controller_Dispatcher_Exception' with message 'Invalid controller class ("Error_ErrorController")' in E:\xampp\php\PEAR\Zend\Controller\Dispatcher\Standard.php:347 Stack trace: #0 E:\xampp\php\PEAR\Zend\Controller\Dispatcher\Standard.php(256): Zend_Controller_Dispatcher_Standard->loadClass('ErrorController') #1 E:\xampp\php\PEAR\Zend\Controller\Front.php(946): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #2 E:\zend_progamming\donyaye_fan_zend\application\Bootstrap.php(110): Zend_Controller_Front->dispatch() #3 E:\zend_progamming\donyaye_fan_zend\public\index.php(5): Bootstrap->runApp() #4 {main} thrown in E:\xampp\php\PEAR\Zend\Controller\Dispatcher\Standard.php on line 347
이이 오류와 관련이 내 부트 스트랩 코드 :
$frontController->addModuleDirectory(ROOT_DIR . '/application/modules');
$frontController->setDefaultModule('default');
$frontController->registerPlugin(new Places_Controller_Plugin_ModuleSetup());
$frontController->registerPlugin(new Zend_Controller_Plugin_ErrorHandler(array(
'module' => 'error',
'controller' => 'error',
'action' => 'error'
)));
이 내 modulesetup 클래스입니다 :
class Places_Controller_Plugin_ModuleSetup extends Zend_Controller_Plugin_Abstract{ public function dispatchLoopStartup(Zend_Controller_Request_Abstract $request)
{
// Set the layout directory for the loaded module
$layoutPath = ROOT_DIR . '/application/modules/' . $request->getModuleName() . '/layouts/scripts/';
Zend_Layout::startMvc(array('layoutPath' =>$layoutPath));
$autoloader = new Zend_Application_Module_Autoloader(array(
'namespace' => '',
'basePath' => ROOT_DIR . "/modules/",
));
$autoloader->addResourceTypes(array(
'admin' => array(
'path' => 'admin/',
'namespace' => 'admin'
),
'error' => array(
'path' => 'error/',
'namespace' => 'error')));
}
}