php缓冲区

参考来源: http://www.tuicool.com/articles/26nmEra

echo "2222
"; ob_clean(); ob_start(); echo "1111
"; ob_end_flush();

输出 : 1111

解释:

清除了上面一个输出:也就是2222

echo "2222
"; ob_start(); echo "1111
"; //ob_end_flush(); ob_end_clean(); //echo ob_get_contents();

输出: 2222

echo "2222
"; ob_start(); echo "1111
"; ob_end_flush(); //ob_end_clean(); echo ob_get_contents();

输出:
2222
1111
2222
1111

你可能感兴趣的:(php缓冲区)