在PHP中,是否有任何方法可以清除/删除之前输出的所有内容?
例如:
<?php
echo 'a';
print 'b';
// some statement that removes all printed/echoed items
echo 'c';
// the final output should be equal to 'c', not 'abc'
?>
我的脚本使用include函数。被包含的文件不应该输出任何内容。为了防止有人(比如黑客)试图这样做,我需要一种方法来移除它们。