PHP:ob_start() Display page at once, forget about cookie,headers sent too early errors PHP的:ob_start()在显示页面一次,忘记有关cookie,头过早发出错误
Posted on 21.发布21。 Aug, 2009 by Dragos in Coding , PHP 2008年8月,2009年在编码 ,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.如果你想一次显示您的网页,而不是后来,减少“头已经发出,不能发送ob_start()在你的脚本开始cookie信息”错误,补充。
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) (php.net)
You can also manipulate the contents of the output by using the function ob_get_contents()您也可以使用操作功能ob_get_contents在输出的内容()
Related posts:相关岗位:












































