PHP Default code commented out, Apache's default code also changed, but the Web site is open or garbled? What's the reason?
If you add a PHP header to the interface, the browser will be able to access the normal, but the program is previously written by the old program, not even the unified portal, each file to change the unrealistic
Environment is php5.6,centos6.5
The program on another server is not a problem, Windows native environment is no problem
Reply content:
PHP Default code commented out, Apache's default code also changed, but the Web site is open or garbled? What's the reason?
If you add a PHP header to the interface, the browser will be able to access the normal, but the program is previously written by the old program, not even the unified portal, each file to change the unrealistic
Environment is php5.6,centos6.5
The program on another server is not a problem, Windows native environment is no problem
After meta setting charset, you also need to change the encoding of the file to ANSI. There are many tools to change the encoding of files, and the general editor supports them. I am using EditPlus, there is a "file code" under the Menu "document", can be modified. If Charset=utf-8, then the code of the file is also utf-8. The browser defaults to the encoding of the read file, and meta settings are generally not a priority.
Shouldn't HTML be set to Utf-8??
Not meta BAA ⊙▽⊙
What is the browser encoding? Now the browser's default estimate is Utf-8.
For example, I write a new page encoded as GBK, open with a browser is garbled, Chrome and Firefox are garbled.
Chrome or FF in F12 see if the Content-type in the response header contains the character set you want, check if the Apache settings are appropriate