免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 2632 | 回复: 10
打印 上一主题 下一主题

警告:Cannot modify header information 。why? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2004-10-01 00:16 |只看该作者 |倒序浏览
我运行了自己编的一个php文件后,提示:
Warning: Cannot modify header information - headers already sent
我很疑惑,不知道哪里有错,请教!

论坛徽章:
1
荣誉版主
日期:2011-11-23 16:44:17
2 [报告]
发表于 2004-10-01 01:21 |只看该作者

警告:Cannot modify header information 。why?

这个错误提示后边还跟了一段英文说明吧,仔细点看一遍就明白了

论坛徽章:
0
3 [报告]
发表于 2004-10-01 13:08 |只看该作者

警告:Cannot modify header information 。why?

前面不能有HTML的输出

论坛徽章:
1
技术图书徽章
日期:2013-12-05 23:25:45
4 [报告]
发表于 2004-10-04 22:22 |只看该作者

警告:Cannot modify header information 。why?

多半是想用cookie或者session或者header
EricssonXiao 该用户已被删除
5 [报告]
发表于 2004-10-05 21:36 |只看该作者
提示: 作者被禁止或删除 内容自动屏蔽

论坛徽章:
0
6 [报告]
发表于 2004-10-06 00:09 |只看该作者

警告:Cannot modify header information 。why?

1。在使用session前,不能有输出,
2。在使用Header()函数前,不能有输出。…………

论坛徽章:
0
7 [报告]
发表于 2004-10-06 11:22 |只看该作者

警告:Cannot modify header information 。why?

还有空格~~! 也不能有
EricssonXiao 该用户已被删除
8 [报告]
发表于 2004-10-06 14:23 |只看该作者
提示: 作者被禁止或删除 内容自动屏蔽

论坛徽章:
0
9 [报告]
发表于 2004-10-06 16:34 |只看该作者

警告:Cannot modify header information 。why?

open your php.ini

Output buffering allows you to send header lines (including cookies) even after you send body content, at the price of slowing PHP's output layer a bit.  You can enable output buffering during runtime by calling the output buffering functions.  You can also enable output buffering for all files by setting this directive to On.  If you wish to limit the size of the buffer to a certain size - you can use a maximum number of bytes instead of 'On', as a value for this directive (e.g., output_buffering=4096).

论坛徽章:
0
10 [报告]
发表于 2004-10-20 16:42 |只看该作者

警告:Cannot modify header information 。why?

原帖由 "aspbiz" 发表:
1。在使用session前,不能有输出,
2。在使用Header()函数前,不能有输出。…………


请问什么叫不能有输出?

别打我,我知道我很菜
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP