Warning: Cannot modify header information - headers already sent by (output started at /home/lprcpoi/public_html/upload3_3.php:3) in /home/lprcpoi/public_html/upload3_3.php on line 362
可以在PHP文档的头尾加上ob_start()和ob_end_flush();
附上手册中的代码:
<?php
function callback($buffer)
{
// replace all the apples with oranges
return (str_replace("apples", "oranges", $buffer));
}
ob_start("callback");
?>
<html>
<body>
<p>It's like comparing apples to oranges.</p>
</body>
</html>
<?php
ob_end_flush();
?>