hide errors, warning and notification from php page

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
bluestar
Forum Newbie
Posts: 13
Joined: Thu Mar 17, 2011 7:19 am

hide errors, warning and notification from php page

Post by bluestar »

how to hide error, warning and notice in php page....
i tried "error_reporting(E_ALL ^ E_NOTICE);" and "error_reporting(0);" putting them on the 1st line after php opening ie(<?php) but they wont work
any suggestion....:)
User avatar
McInfo
DevNet Resident
Posts: 1532
Joined: Wed Apr 01, 2009 1:31 pm

Re: hide errors, warning and notification from php page

Post by McInfo »

Turn display_errors off. However, most errors can be prevented; and it is better to prevent errors than to conceal them. On a development server, you should keep display_errors enabled.
Post Reply