Home  >  Article  >  php教程  >  php使用<?php include之后页首有空白

php使用<?php include之后页首有空白

WBOY
WBOYOriginal
2016-06-06 19:46:591388browse

1.今天做这一个页面的时候发现如果使用?php include包含了一个页面,但是页首始终有一个空白行,度娘出来原来是因为使用了UTF-8格式,应该选择UFT-8无BOM格式的,原来还有这一说,之前只知道UFT-8会兼容所有语言的。下面是高手的解释: BOM: Byte Order Mark

1.今天做这一个页面的时候发现如果使用

BOM: Byte Order Mark
UTF-8 BOM又叫UTF-8 签名,其实UTF-8 的BOM对UFT-8没有作用,是为了支援UTF-16,UTF-32才加上的BOM,BOM签名的意思就是告诉编辑器当前文件采用何种编码,方便编辑器识别,但是BOM虽然在编辑器中不显示,但是会产生输出,就像多了一个空行。

 

2.但是加了这个之后页面上有乱码,再加上 ,注意这个不能写成,要不然IE浏览器还是会有乱码的。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn