PHP:ob_start() Display page at once, forget about cookie,headers sent too early errors
Posted on 21. Aug, 2009 by Dragos in Coding, PHP
If you want to display your web pages at once, not subsequently, and reduce the “headers already sent, cannot send cookie information” errors, add ob_start() at the start of your script.
This function will turn output buffering on. While output buffering is active no output is sent from the script (other than headers), instead the output is stored in an internal buffer. (php.net)
You can also manipulate the contents of the output by using the function ob_get_contents()
Translate this post
Related posts:
- PHP: How to download a webpage (aka web scrapping) with PHP
- WordPress: Best SEO iTranslator for WordPress, get free traffic from fully automated plugin script
- Coding:How to fetch user profile data with SSI.php from a SMF forum database
- JavaScript: Send function as a parameter to another function (callbacks)
-
Hakanyalcin










































