PHP Error Handling Print

  • 0

 

Due to the nature of shared web hosting, we have display_errors = off, which is generally a safe policy with production websites so important data/details are not accidentally displayed to end-users. e.g. data source details. I don't believe we can be 100% confident that any level of error reporting won't accidentally display key information regarding your or our setup.

You MAY be able effect this change for just your website using the ini_set() tag in your code. Perhaps on a globally included page. This will effectively make a run time change to the php.ini tag for your code alone.

 

ini_set('display_errors', TRUE); OR ini_set('display_errors', 1);

ini_set('error_reporting', E_ALL);

 

The above examples may not be 100% correct and only serve as a starting point for your own code. There may be an ever easier or more efficient way. Please consult your PHP guides.

 

Please see: http://www.php.net/errorfunc

 

 


Was this answer helpful?

« Back