How can I turn off PHP error output?

To disable error output in your script, use:

error_reporting (0);

Remember that you need to call this function before starting any PHP directives.

You can also use this code in the .htaccess file to disable error output:

php_flag display_errors off

  • 97 Users Found This Useful
Was this answer helpful?

Related Articles

Got an error about an outdated MySQL version?

When connecting the site to the database, an error occurred telling us that the MySQL version is...

I can see the old site content after uploading new files

Most likely, your browser keeps old copies in the cache for fast loading of your site. You need...

My Wordpress has been hacked, how do I reset my admin password?

If your Wordpress password has been changed to an unknown value, you can always change it by...

Firefox error: The page isn't redirecting properly

When a page redirects you to an infinite redirect, Firefox will display the error: The page isn't...

Error 502 Bad Gateway nginx and why does it occur?

If this error occurs, then HTTP requests from clients to your site are going through some kind of...