$Date: 2004/08/07 14:28:59 $
This example requires :
This example will show you how to handle html_progress errors both for display and file logging system. Such as used in development phase.
An error was volontary made on call of setAnimSpeed method (line 20). As it's an API error, default is to return error after it was raised, so lines below line 21 will be executed.
Error is also logged on 'progress2.log' (line 8) flat file type (line 14) which format look like apache logs (lines 7 to 13).
Print out errors (as a part of the output). For production web sites, you're strongly encouraged to turn this feature off, and use error logging instead. Keeping display_errors enabled on a production web site may reveal security information to end users, such as file paths on your Web server, your database schema or other information.
1 | ini_set('display_errors', false); |
Log errors into a log file (server-specific log, stderr, syslog ...) As stated above, you're strongly advised to use error logging in place of error displaying on production web sites.
1 | ini_set('log_errors', true); |
None, all default options are used. These options are :
[Top]
Error: invalid input, parameter #1 "$delay" was expecting "less or equal 1000", instead got "10000" in html_progress::setanimspeed (file d:\php\pear\html_progress\examples\errorstack\secure\log_errors-p2.php at line 20) Catch PEAR_Error
Inside the progress2.log file:
127.0.0.1 [07/Aug/2004:14:04:36] - error - invalid input, parameter #1 "$delay" was expecting "less or equal 1000", instead got "10000" (context: Function="html_progress::setanimspeed" File="d:\php\pear\html_progress\examples\errorstack\secure\log_errors-p2.php" Line="20")
[Top]
[Top]