参考来源: http://www.tuicool.com/articles/26nmEra
echo "2222<br/>";
ob_clean();
ob_start();
echo "1111<br/>";
ob_end_flush();
输出 : 1111
解释:
清除了上面一个输出:也就是2222
echo "2222<br/>";
ob_start();
echo "1111<br/>";
//ob_end_flush();
ob_end_clean();
//echo ob_get_contents();
输出: 2222
echo "2222<br/>";
ob_start();
echo "1111<br/>";
ob_end_flush();
//ob_end_clean();
echo ob_get_contents();
输出:
2222
1111
2222
1111