输出STILL工作后在php中发送的标头 [英] headers sent in php after output STILL working

查看:160
本文介绍了输出STILL工作后在php中发送的标头的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这个简单的脚本:

this is output!

<?php

header("Location: http://www.google.com");

?>

你相信它是否有效,我也没有警告!

You believe it or not it works and I get no warnings either!

手册说在发送标题之前不应该输出,否则实际上不会发送标题。但无论如何它确实有用,这让我感到烦恼。

The manual says no output should be done before sending headers or no headers will be actually sent. But it does work anyway and it is annoying me.

推荐答案

这是因为输出缓冲区

这篇关于输出STILL工作后在php中发送的标头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆