Number Of Page View:100,000+/Months
LOGIN |New User


How we use Error logging error handling method in PHP?
In PHP,by default an error log send to the error log system.By using error logging we can send and error log to the specific file.
 We checked this by using an example.In this we send a mail to our self with error message.And the scripts does not work when error comes.
//error handler function
function customError($errorno, $errorstr)
    echo "<b>Error:</b> [$errno] $errorstr<br />";
    echo "program has been notified";
    error_log("Error: [$errorno] $errorstr",1,
//set error handler
//trigger error
if ($i<=1)
    trigger_error("I should be greater than 1", E_USER_WARNING);
[512] I should be greater than 1
program has been notified
Our mail have reply message like that,
Error: [512] I should be greater than 1