The web page font problem of MYSQL + PHP. APACHECTL + mysql + PHP is built under centos... Now there is a message board: Chinese characters entered on the mobile phone are not displayed properly, but Chinese characters on the webpage are garbled .. Solve New... ------ solution -------------------- coding with UTF-8 ------ solution ------------- web page font problem of MYSQL + PHP
APACHECTL + mysql + PHP built under centos...
Now there is a message board:
Chinese characters are displayed on mobile phones, but Chinese characters are garbled ..
Solving new users...
------ Solution --------------------
Coded by UTF-8
------ Solution --------------------
If UTF-8 is set for both the database and webpage, no problem will occur.
------ Solution --------------------
There are multiple places
Html file
Whether your file is encoded as ANSI or utf8
What encoding is the data from the database?
All have to be unified
------ Solution --------------------
Add this to the page header and try gb2312 again.
------ Solution --------------------
Check these items.
First, set the page encoding to Chinese, utf8, gb2312, and other Chinese encoding.
The second is the encoding of the saved file.
Finally, if the data is read by the database, set the database encoding.