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
The Firefox Xdebug Toolbar of PHPEdit helps you to debug your scripts on your server. You can easily turn on debugging or profiling for each request, or just for some special ones.
The toolbar is able to exchange important data between an opened PHPEdit instance and the toolbar. You can for example define which errors should be displayed, or if xDebug should pause the execution of the script on the startup.