ob_start(); echo ' this is first content '; ob_start(); echo 'this is second content '; ob_start(); echo 'this is three content '; ob_end_flush(); ob_end_clean(); ob_end_clean();
上面的情况没有任何内容输出。
php手册上说是送出最顶层缓冲区的内容,并关闭缓存。最顶层缓冲区是指的'this is three content '的内容还是' this is first content '的内容呢?但是都应该有输出才对吧,不知道是怎么回事,请帮我解答下,谢谢。
回复内容:
ob_start(); echo ' this is first content '; ob_start(); echo 'this is second content '; ob_start(); echo 'this is three content '; ob_end_flush(); ob_end_clean(); ob_end_clean();
上面的情况没有任何内容输出。
php手册上说是送出最顶层缓冲区的内容,并关闭缓存。最顶层缓冲区是指的'this is three content '的内容还是' this is first content '的内容呢?但是都应该有输出才对吧,不知道是怎么回事,请帮我解答下,谢谢。
给你一个链接,希望能帮助你http://blog.csdn.net/p569354158/article/details/8120177
http://lmgtfy.com/?q=ob_end_flush
对于一个刚进入PHP 开发大门的程序员,最需要的就是一本实用的开发参考书,而不仅仅是各种快速入门的only hello wold。在开发的时候,也要注意到许多技巧和一些“潜规则”。PHP是一门很简单的脚本语言,但是用好它,也要下功夫的。同时,由于PHP 的特性,我一再强调,最NB 的PHP 程序员都不是搞PHP 的。为什么呢?因为PHP 作为一种胶水语言,用于粘合后端 数据库和前端页面,更多需










