After the. html file is saved as a. php file, all Chinese characters are question marks. What should I do if I suspect it is a problem with php or apache? Example: ------ solution ------------------ it's a garbled problem ...... Reference: Check whether the encoding of the following encoding items is consistent: if the encoding used by the database operation is the same as the encoding of the encoding file used on the current page, no problem occurs. ------ Solution ----------- after the. html file is saved as a. php file, all Chinese characters are question marks. What should I do if I suspect it is a problem with php or apache?
Example
------ Solution --------------------
Discussion
It's also a garbled problem ......
Reference:
For garbled characters, check whether the following codes are consistent:
Encoding used by the database
Encoding used for database operations
Encoding used on the current page
File encoding
If they are consistent, there will be no problem.
------ Solution --------------------
Set the file encoding and html header encoding correctly.
------ Solution --------------------
Mysql databases, php files, and php files must be completed.
Correct settings:
For example, all are UTF-8
Set mysql database to utf8 unicode,
Php header:
The most important thing is that the php file is UTF-8 encoded. the default value is ansi.
Method: Open the php file in Notepad and save it as UTF-8.
OK!