Cannot modify header information – headers already sent by… 解决方案

相信在你读到这篇文章之前,已经搜索了很多关于这个错误的信息。我就不解释了。

使用PHP的header函数输出错误: Cannot modify header information – headers already sent by

header("location:http://site.com/page1.php");



解决方案:
$location = “http://site.com/page1.php";
echo "<meta http-equiv='refresh' content='0;url=$location' />";

posted on 2012-03-28 00:57  IT技术畅销书  阅读(166)  评论(0)    收藏  举报

导航