Php/ref output ob clean

来自菜鸟教程
跳转至:导航、​搜索

PHP ob_clean()函数

Output PHP输出控制功能

删除一些输出,然后才能将其发送到浏览器:

<?php
ob_start();
echo "This output will not be sent to the 
  browser";
ob_clean();
echo "This output will be sent to the browser";

  ob_end_flush();
?>

定义和用法

The ob_clean() 函数删除最顶层输出缓冲区的所有内容,以防止它们被发送到浏览器。

句法

ob_clean();

技术细节

PHP版本: 4.2

Output PHP输出控制功能