June 2005
Intermediate
720 pages
20h 6m
English
PHP provides remarkably useful and descriptive error messages when things go awry. Unfortunately, PHP doesn’t show these errors when running using its default configuration. This policy makes sense for live servers, where you don’t want the end users seeing PHP-specific error messages, but it also makes everything that much more confusing for the beginning PHP developer. To see PHP’s errors, you must turn on the display_errors directive, either in an individual script or for the PHP configuration as a whole.
To turn on display_errors in a script, use the ini_set() function. As its arguments, this function takes a directive name and what setting it should have:
ini_set('display_errors', 1);
Including this line in a script ...
Read now
Unlock full access