Page 1 of 1

Hiding warnings?

Posted: Thu Jun 02, 2005 5:58 am
by jkelly
Is there a way of hiding all warnings that come up on your browser? I have my project demonstration in an hour and i NEED to get rid of them!!!!
Thanks

Posted: Thu Jun 02, 2005 6:41 am
by Chris Corbyn
On the very top line in a <?php ?> block add

Code: Select all

error_reporting(0);
Then after the demonstration go fix your code :P

Posted: Thu Jun 02, 2005 7:13 am
by phpScott
if you have access to the php.ini you can alway turn the error reporting off. Then restart your server.

Posted: Thu Jun 02, 2005 8:45 am
by JAM
phpScott wrote:if you have access to the php.ini you can alway turn the error reporting off. Then restart your server.
Also worth noting... ini_set()

Posted: Thu Jun 02, 2005 9:12 am
by patrikG
To only turn warnings off, but leave error-messages

Code: Select all

error_reporting (E_ALL ^ E_NOTICE);
just like the ultimate guide says.