Try this. In your php.ini file: display_errors = Off log_errors = On track_errors = On
Then in your code: $php_errormsg = false; ob_start(); ... your code ... if($php_errormsg) { ob_end_clean(); // Error - discard buffer echo "An error occurred - webmaster notified"; } else { ob_end_flush(); // No error, send buffer } -Rasmus On Sun, 17 Nov 2002, Mattia wrote: > When the display_errors is Off, and the output of the page comes all in the > end, or when you're using some template engine or some output buffer > function (ob_start()), no output is displayed to the screen! I would like to > tell a message to the use in case of failure of the scripy, without giving > the information of the kind of error it is. > > Display a message like: the application has caused an error! the webmaster > has been notified by email. > > And the precise error in the error log, like: Parse error in line .... file > .... > > Is there anythig to do it without setting up a custom error log? > > thanks > Mattia > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php