Why does this error appear when I include a php file

Asked

Viewed 1,465 times

1

I have the error problem  every time I try to include a file.

I am working on an application. When trying to include another php file simply create a space on the page where the characters appear: .

I appreciate help as soon as possible.

  • If the answer solved the problem mark it as correct, if you do not know how to do see a tutorial: http://meta.pt.stackoverflow.com/q/1078/3635

  • @Bacco I thought about it and I admit that many answers in Sopt should follow your suggestion, the question is that there the question is for those who already know what is GOOD and what it serves and what changes without, here the question is "how to remove", I think that in my view is the difference between both.

  • @Bacco I will only leave my comments 1 and 2, because one of them is to guide the AP and the other is to defend why reopen, since I ended up voting for this, but if remain closed also see no problem, following by your suggestion to keep the link between both :)

  • @Guilhermenascimento I agree. Leave that last one too, there it is all right, so whoever arrives later will know that we had a conversation about the different views on the closing :)

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 GOOD, see how to do this with:

  • Using Notepad++:

    utf8 sem bom notepad++

  • Using Sublime Text:

    utf8 sublime sublimetext

  • Vim:

    Define the fileencoding as utf8 (I believe I am already without GOOD)

    :set fileencoding=utf8
    :w arquivo.txt
    

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

  • Okay it already worked.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.