calmchess Posted December 14, 2009 Share Posted December 14, 2009 I'm planning to rewrite some of my scripts so they don't have to use output buffering to accomplish their form validation and html displays......so what rules should i follow when rewriting it so i can avoid setting output_buffering to a high value? Link to comment https://forums.phpfreaks.com/topic/185049-output_buffering-so-rewrite/ Share on other sites More sharing options...
trq Posted December 14, 2009 Share Posted December 14, 2009 How exactly are you using output buffering in the first place? Link to comment https://forums.phpfreaks.com/topic/185049-output_buffering-so-rewrite/#findComment-976798 Share on other sites More sharing options...
calmchess Posted December 14, 2009 Author Share Posted December 14, 2009 well right now i have so much html being ouputed before the php that i have to increase the ouput buffer setting in php.ini to accomodate all of the html......i don't exactly know how it works that is why i'm exploring this with a thread.....any comments are welcome. Link to comment https://forums.phpfreaks.com/topic/185049-output_buffering-so-rewrite/#findComment-976805 Share on other sites More sharing options...
rajivgonsalves Posted December 14, 2009 Share Posted December 14, 2009 its better you rewrite your php code, or you can use ob_start() I think that should work without modifying your php.ini Link to comment https://forums.phpfreaks.com/topic/185049-output_buffering-so-rewrite/#findComment-976812 Share on other sites More sharing options...
trq Posted December 14, 2009 Share Posted December 14, 2009 Are you using output buffering to avoid header errors? Is that what your getting at? You need to simply re-organize your code so that it doesn't output prior to calling header(). It makes little sense to attempt to output something if all you are going to do is redirect to another page. Link to comment https://forums.phpfreaks.com/topic/185049-output_buffering-so-rewrite/#findComment-976821 Share on other sites More sharing options...
calmchess Posted December 14, 2009 Author Share Posted December 14, 2009 yes thorpe trying to avoid header errors I have alot of CSS in the head section of my document and php for validation code mixed in with my html.....i want to rewrite to avoid the header errors....but need best practices to stucture the document and avoid the header errors in the first place. Link to comment https://forums.phpfreaks.com/topic/185049-output_buffering-so-rewrite/#findComment-976824 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.