Created by Keloran, last update on 30/10/2008 11:38
A nice way to display errors when your on your dev area,
and then for the same errors to be sent to your email address when the site is on live, without having to change the code
all you have todo is, set your dev, live..defenitions
e.g. if (strstr($_SERVER['HTTP_HOST'], ".dev") {
define("DEV", true);
} else {
define("LIVE", true);
}
and then include the extension handler afterwards
<?php
/**
* The root of all errors.
*/
class Error extends Exception {
/**
* Create a new error
*
* @param string $message the error message
* @param int $errno one of E_ERROR, E_WARNING, etc.
* @param string $file the path to the file in which the error occurred
* @param int $line the line number in the file at which the error occurred
If your projects use special file extension for PHP documents (.module for example) you will need to explain PHPEdit this to be able to debug.
Open the preference dialog (F10) and in the Language -> PHP section, you can add your extensions there (ie. "module" for example) after the existing list.