mikefrederick Posted March 31, 2008 Share Posted March 31, 2008 I have come across a rare case in which it is understandable that a headers already sent error occurs, but I need the code to remain as is. I would explain further but it is intricate... Is there anyway to make it so that the warning does not show up on the page? Quote Link to comment Share on other sites More sharing options...
mikefrederick Posted March 31, 2008 Author Share Posted March 31, 2008 by the way i know you can use error_reporting I just never have and don't know the specifics of the function Quote Link to comment Share on other sites More sharing options...
mikefrederick Posted March 31, 2008 Author Share Posted March 31, 2008 and also i don't want to do error_reporting(0)...just want to turn the header error off. Quote Link to comment Share on other sites More sharing options...
trq Posted March 31, 2008 Share Posted March 31, 2008 You can simply turn display errors off for that particular script. <?php ini_set('display_errors','0'); ?> Quote Link to comment Share on other sites More sharing options...
trq Posted March 31, 2008 Share Posted March 31, 2008 Of course depending on what is causing the error, you could wrap your output in a buffer (using ob_start()) thus actually removing the cause of the error. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.