存档

文章标签 ‘BOM’

偶尔美工设计师使用Dreamweaver时会加BOM, 这样写PHP程序时会因为BOM头输出产生错误: 如 header() , session_start() 时会提 : Header may not contain more than a single header, new line detected … 所以上网搜索了一下,知道BOM文件开头的三个字符是0xEF, 0xBB, 0xBF 所以可以使用下边的代码清除BOM.代码如下:

六 14th, 2009 | Filed under PHP
标签: , ,