After the. html file is saved as a. php file, Chinese is all question marks. Suspected to be PHP or Apache related issues, how to deal with

Source: Internet
Author: User
Tags html header
After the. html file is saved as a. php file, Chinese is all question marks. Suspect is a PHP or Apache problem, how to do?
Title

------Solution--------------------
Explore

Again garbled problem ...

Reference:

Garbled problem please check the following code consistency:

Encoding used by the database
Encoding used in database operations
The encoding used by the current page
Encoding of the file itself

In the same word, there will be no problem.

------Solution--------------------
File encoding and HTML header encoding to be set correctly





------Solution--------------------
MySQL database, php files inside, PHP itself must be one-to-the-line.

Correct settings:
Such as: All are Utf-8
MySQL database is set to UTF8 Unicode,
The PHP header is set to:
The most important point: if the PHP file itself is UTF-8 encoded, the default is ANSI.
Method: Open php file with Notepad, save as: Select Utf-8 encoding.
Ok!
  • 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.