PHP Code garbled problem

Source: Internet
Author: User
header("Content-type: text/html; charset=utf-8");echo "是是是";

?>
This print out is garbled how to solve, online check said to change the code format, see not quite understand. Please be instructed by the great God.

Reply content:

header("Content-type: text/html; charset=utf-8");echo "是是是";

?>
This print out is garbled how to solve, online check said to change the code format, see not quite understand. Please be instructed by the great God.

Content-type that is to tell the browser, you return the data encoding type is UTF-8, so, your source code text should also correspond to UTF-8 encoding. Open the editor, such as Geany, and then set the file encoding to UTF-8, In this way, the browser will be able to display the normal Chinese.

Use the nodepad++ class text editor, or the IDE right-click File to change the encoding format for the file you want to output

First, confirm that the text you are editing is Utf-8,
Again, confirm that the output is utf-8,
If there is a database. Please confirm database Utf-8
Multi-check

I had this problem when I was using sublime, and I was in it. Save the text as a utf-8 format
Then you have to open the root directory of the file and then open Save As with a text document, then choose the encoding format
There are also browser fonts you have to set the code below

  • 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.