我有索引文件中像这样为什么heder('Location:index')不工作,但window.location.href ='index.php'正在工作?
<?php
include('file1.php');
include('file2.php');
?>
在file1.php
我有类似下面的代码。
<?php
echo "hai";
?>
我试图用。它的页面重定向抛出一个错误类似的输出已经started.I知道头,如果我们给回声声明它抛出一个error.In这种情况下,我想通过使用Javascript window.location.href='index.php'
重定向。它给了我预期的输出,并没有错误。为什么?
( '地点:的index.php');'? – 2010-11-01 04:17:27
@jeff Rupert在file2.php – svk 2010-11-01 04:18:11