warning suppression

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
miyur
Forum Newbie
Posts: 15
Joined: Sat Jan 10, 2009 9:06 am

warning suppression

Post 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
User avatar
novice4eva
Forum Contributor
Posts: 327
Joined: Thu Mar 29, 2007 3:48 am
Location: Nepal

Re: warning suppression

Post 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
miyur
Forum Newbie
Posts: 15
Joined: Sat Jan 10, 2009 9:06 am

Re: warning suppression

Post by miyur »

Thanks buddy.that solved the problem.
cheers.
Post Reply