Simply Program

Simply programming - It’s a life style
Filed under Programming, PHP

How do you show errors for a single php script when the entire server has the enviorment variable "display_errors" set to 0?

Simple - place the below code at the top of your script.

CODE:
  1. ini_set("display_errors", 1);
  2. error_reporting(E_ALL);

ini_set - allows you to mess with your php.ini file.
error_reporting - sets what kind of errors you wish to show.

Posted by sp on Wednesday, July 9th, 2008


You can follow any responses to this entry through the magic of "RSS 2.0" and leave a trackback from your own site.