【发布时间】:2013-07-07 09:58:21
【问题描述】:
我的服务器根目录中有一个文件:
<?php
header("Location: http://www.google.com/", true); //this does not work
//echo "Test"; //this is tested and works.
?>
我的 php.ini 文件是否有错误,或者为什么会这样?
【问题讨论】:
-
您是否看到任何错误(打开错误报告后)?您能否定义“不起作用”
-
@Lix 它不会重定向到 google.com
-
不,我没有看到任何错误。
-
你没有关于
headers already sent的日志吗? -
检查您的日志是否有错误。这是整个脚本还是您之前生成了一些输出?
标签: php