gb2312的php文件转换为utf-8格式后的一个错误

简介:这是gb2312的php文件转换为utf-8格式后的一个错误的详细页面,介绍了和php,有关的知识、技巧、经验,和一些php源码等。

class='pingjiaF' frameborder='0' src='http://biancheng.dnbcw.info/pingjia.php?id=324443' scrolling='no'> GB2312的php文件转换为UTF-8格式后,php程序运行时就会出现header已发送这样的错误提示(试图打开session的时候)。

错误如下:
代码:
Warning: Cannot modify header information - headers already sent by (output started at /home/yoyo/public_html/blog/index.php:1) in /home/yoyo/public_html/blog/global.php on line 11
?
Warning: Cannot modify header information - headers already sent by (output started at /home/yoyo/public_html/blog/index.php:1) in /home/yoyo/public_html/blog/global.php on line 35


这样的错误通常是在打开session之前页面已经有输出时出现,在IE下面看,并没有输出,可是在firefox下面看,在正式页面输出前,有一个字节的乱码。这个乱码就是造成错误的原因(它在session之前就输出了)。

解决的方法:找到你有出错提示的文件,下载下来,用编辑器(推荐用最新版的editplus)打开,拷贝代码,删除这个文件,重建一个新文件,复制刚才的代码进去,存文件的时候,一定要存成UTF-8的,上传覆盖原文件,应该就好了。

“gb2312的php文件转换为utf-8格式后的一个错误”的更多相关文章 》

爱J2EE关注Java迈克尔杰克逊视频站JSON在线工具

http://biancheng.dnbcw.info/php/324443.html pageNo:14

posted on 2011-11-18 11:13  圣者  阅读(150)  评论(0编辑  收藏  举报

导航