How does error controller work in zend
I just want to know how does error co开发者_如何学JAVAntroller work for different module ,say its admin and default,in zend framework... because its working fine in default module but not working in admin module ...
is there any condition which I have to use? and how ?
If you are using a custom error handler (if not, you probably will be soon), you need to register it with the front controller:
$front = Zend_Controller_Front::getInstance();
$front->registerPlugin(new Zend_Controller_Plugin_ErrorHandler(array(
'module' => 'error',
'controller' => 'error',
'action' => 'error'
)));
This means you have a module, a controller and action all called 'error'. If you don't have a custom error controller yet, google it or have a read through http://www.thedeveloperday.com/custom-profiler-for-live-environments/
精彩评论