Coded layout garbled utf-8 PHP
Rt,html/php/mysql Unified with Utf-8 code, if PHP with a BOM encoding format, will affect the layout of the page, as long as there is an include in PHP in the page more than one line of blank, if no BOM encoding, directly all Chinese will be garbled, if no BOM code, Add the header ("content-type:text/html; Charset=utf-8″), or will affect the layout, it seems that this code is added BOM header function.
I don't want to add the Include field to all the files, and that will be code redundancy.
Is there any good way to solve this?
Reply to discussion (solution)
The soy sauce ....
The soy sauce .... I have solved ...
Put
Put it on the first line of each file.
The soy sauce .... I have solved ...
Put
Put it on the first line of each file.
--so garbled is that the browser does not recognize your encoding format, this should be added
Then knot it.
The soy sauce .... I have solved ...
Put
Put it on the first line of each file.
--so garbled is that the browser does not recognize your encoding format, this should be added
It was added before, but not on the head.