How can I hide PHP error messages in browser?

If you ever wondered, now can I hide PHP error messages in browser?  here are some simple solutions:

in php.ini file (global settings for server):

display_errors = Off

Using the ini_set() function to set the value of this, you will have to do it every time you run the script though.

ini_set("display_errors", "off");

use : error_reporting() function:

byrev Written by:

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *