【发布时间】:2012-11-01 15:49:08
【问题描述】:
我有这个简单的脚本:
this is output!
<?php
header("Location: http://www.google.com");
?>
你信不信它有效,我也没有收到任何警告!
手册说在发送标头之前不应进行任何输出,否则将不会实际发送标头。但无论如何它确实有效,这让我很烦。
【问题讨论】:
-
您已打开输出缓冲。
标签: php http-headers
我有这个简单的脚本:
this is output!
<?php
header("Location: http://www.google.com");
?>
你信不信它有效,我也没有收到任何警告!
手册说在发送标头之前不应进行任何输出,否则将不会实际发送标头。但无论如何它确实有效,这让我很烦。
【问题讨论】:
标签: php http-headers
这是可能的,因为output buffers。
【讨论】: