Here's whats in my
bootstrap.php:
Code:
<?php
error_reporting(E_ALL | E_STRICT);
ini_set('display_startup_errors', 1);
ini_set('display_errors', 1);
date_default_timezone_set('Australia/Melbourne');
set_include_path('.' . PATH_SEPARATOR . '../library/'
. PATH_SEPARATOR . '../application'
. PATH_SEPARATOR . '../application/models'
. PATH_SEPARATOR . get_include_path());
include "Zend/Loader.php";
Zend_Loader::registerAutoload();
$config = new Zend_Config_Ini('../application/config.ini', 'default');
$registry = Zend_Registry::getInstance();
$registry->set('config', $config);
Zend_Layout::startMvc($config->appearance);
$frontController = Zend_Controller_Front::getInstance();
$frontController->throwExceptions(false);
$frontController->setControllerDirectory('../application/controllers');
$frontController->setBaseUrl('/');
$frontController->dispatch();
Then I've got a Controller called
ErrorController.php
All mine has in it is:
Code:
<?php
class ErrorController extends Zend_Controller_Action
{
public function init()
{
$this->view->baseUrl = $this->_request->getBaseUrl();
}
public function errorAction()
{
$this->view->title = "Error Page";
}
}
Then inside of:
views->scripts->error i've got a page called
error.phtml
And all that contains is a custom error message.
In my bootstrap I just change the flag in
$frontController->throwExceptions(false); to
true when I'm debugging.
Al