My LAMP server spills out ï "¿before anything

I have a lamp server and it has output, which I think is also the reason for preventing page redirection with header('location: xxxx');

it is not always displayed, but sometimes it simply displays 

I use ob_start('ob_gzhandler'); The only thing that I thought could cause this could someone help?

UPDATE Sometimes I used Dreamweaver, and I think the editor calls it. It shows only Unicode options when I try to save:

  • C (canonical decomposition followed by canonical composition)
  • KC (Decomposition of compatibility followed by canonical composition)
  • KD (decomposition of compatibility)
  • D (canonical decomposition)

and then the checkbox "Enable Unicode Signatures (BOM) which I never check, although my problem is the specification

+4
source share
2 answers

You can fix this by changing the type of your content.

 header("Content-type: text/html; charset=utf-8"); 
+3
source

ï "¿is a specification for UTF-8, so try saving the file with the encoding" UTF-8 without specification "and check if it allows it.

+4
source

Source: https://habr.com/ru/post/1368852/


All Articles