PHP include causes white space at the top of the page

后端 未结 15 1204
無奈伤痛
無奈伤痛 2020-11-30 09:36

I have a problem on a site that I am making. There is this line of white space at the top of my page. I can not find out where it is coming from. It might be because of extr

15条回答
  •  刺人心
    刺人心 (楼主)
    2020-11-30 10:17

    I got it! I must admit, this was a very strange one.

    This was my exact problem, and his solution fixed it perfectly.


    The problem was because of the include().

    When you save a page as UTF-8, a special signature called a byte-order mark (or BOM) is included at the beginning of the file, indicating that it is a UTF-8 file. You can only see BOMs with low level text editors (such as DOS edit). You need to remove this signature from the included file in order to get rid of the white space at the top of the page.

    DOS edit

提交回复
热议问题