PHP is garbled after uploading documents

Source: Internet
Author: User
PHP is garbled after uploading files. all my PHP pages are: after GB2312 is uploaded, the Chinese character values uploaded to the database are garbled. Number: (for example, 9/1/3/9) check the encoding format of the table in the database and the encoding format of the field storing the uploaded file name. In addition, if both are correct, then let's look at the garbled characters after you operate on the PHP file uploaded by the mysql client.
For example, all my PHP pages are GB2312

After uploading, the Chinese character values uploaded to the database are garbled. Number: (for example, 9/1/3/9)




Please solve

------ Solution --------------------
Check the encoding format of the table in the database and the encoding format of the field storing the uploaded file name,
In addition, if both are correct,
Let's take a look at the formats supported by your operations on the mysql client. it is best to use set names to encode the submitted SQL statement!
------ Solution --------------------
Use UTF-8 is the best!
------ Solution --------------------
What is the encoding problem in your database?
During website creation, the project and database encoding must be unified. Avoid extra trouble
------ Solution --------------------
Agree upstairs
Use set name

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.