Questions about the webpage font made by MYSQL + PHP-php Tutorial

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.