Why does this error appear ï " ¿when I include a php file [duplicate]

this question already has answers here : What is the unicode signature (BOM)? (2 responses) Closed for 4 years.

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

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

I appreciate help as soon as possible.

Author: Guilherme Nascimento, 2016-02-28

1 answers

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

  • Using Notepad++:

    utf8 without good Notepad++

  • Using Sublime Text:

    utf8 sublime sublimetext

  • Vim:

    Set the fileencoding to utf8 (I believe it already runs out of good)

    :set fileencoding=utf8
    :w arquivo.txt
    

To understand the differences between UTF8 with and no good, read:

 1
Author: Guilherme Nascimento, 2017-04-13 12:59:38