在浏览php.net网站时,我看到了一个header的示例,它说会给我报错。我复制了它,并在WAMP上执行,但是没有显示任何错误,而是重定向到了该网站。
<html>
<?php
/* This should give an error (but it doesn't!). Note the output
* above, which is before the header() call */
header('Location: http://www.example.com/');
?>
我想知道,在我的WAMP中,这是否是正确的行为,还是出现了错误,或者我在php.ini文件中启用了特定的设置使其工作!如果有人需要复制我的php.ini,请告诉我。
谢谢, Tanmay