Page 1 of 1

warning suppression

Posted: Wed Apr 01, 2009 12:23 am
by miyur
hi all,
i've a question here. could you people help me in knowing about how should i suppress warning messages in my php code.i know that it can be done by playing around with php.ini file and just turning off those warning messages there but that is not the issue here as i dont want to do this because in that case it will affect all my running projects.it's just that i want to suppress warnings in only a part of the code and not the whole project, so something like @ can help. but @ is not helping either. any suggestions???
thank and regards,
Miyur

Re: warning suppression

Posted: Wed Apr 01, 2009 1:28 am
by novice4eva

Code: Select all

 
ini_set('display_errors', 1);
ini_set('error_reporting', E_ALL);
 
To show all the errors

Code: Select all

 
ini_set('display_errors', 0);
 
For not displaying any errors

Re: warning suppression

Posted: Thu Apr 02, 2009 11:46 pm
by miyur
Thanks buddy.that solved the problem.
cheers.