What is garbled code?

Source: Internet
Author: User
What is garbled code? Setcookie ("TestCookie", "", time ()-3600 );
If (! Empty ($ _ COOKIE ["TestCookie"])
Echo "testcookie value:". $ _ COOKIE ["TestCookie"]."
";
Else
Echo "testcookie is canceled.
";
Print_r ($ _ COOKIE );
?>


Reply to discussion (solution)

No garbled characters were found after testing.

Is it a matter of character?

You have not set character encoding here, and the browser will use its own default encoding.

If your file encoding is the same as that of your browser, no garbled text will be displayed. if the file encoding is different, no garbled text will be displayed.

You 'd better set the file encoding, so the browser will know which encoding method is used, so that no garbled characters will be involved.

You can check the encoding of the program file, and use the header function to set the encoding for viewing in the browser.

It mainly depends on what kind of garbled code you are using. There are many possibilities for garbled code.

Check whether the file encoding is consistent with the browser 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.