Why this error appears ï »¿when I include a php [duplicate]

1

I have the problem of error  whenever I try to include a file.

I'm working on an application. When trying to include another file in php simply creates a space on the page, where the characters appear:  .

Thank you for your help as soon as possible.

    
asked by anonymous 28.02.2016 / 21:44

1 answer

1

This is because the included file is saved in UTF8 format with BOM instead of UTF8 without BOM, all files must be saved with ut8 without BOM , see how to do this with:

  • Using notepad ++:

  • UsingSublimeText:

  • I came:

    Set fileencoding to utf8 (I believe I'm out of BOM)

    :set fileencoding=utf8
    :w arquivo.txt
    

To understand the differences between UTF8 with and without BOM, read:

28.02.2016 / 21:53