A piece of PHP garbled text in the Chinese field in the address bar

Source: Internet
Author: User
A piece of PHP's Chinese character passing value in the address bar shows garbled characters in IE, and the Chinese character passing value turns into garbled characters, causing no data to be captured. But it can be used in Firefox. Pass value Page, mysql, query, receive value page, are UTF-8 font library this is what's going on? ------ Solution ------------------ set this parameter url_encode ($ name); then url_decode ($ _ GET [garbled text in the address bar of a PHP segment in Tclas
In IE, the last Chinese character is garbled, and the data cannot be captured.

But it can be used in Firefox.

Pass the value Page, mysql, query, receive the value page, are UTF-8 font

What is this?

------ Solution --------------------
Url_encode ($ name );
Next, url_decode ($ _ GET ['tclass']);
------ Solution --------------------
PHP code
// A. php "> aaaa // B. php $ T_class =$ _ GET ['tclass']; echo urldecode ($ T_class); // test ceiling
------ Solution --------------------
Echo"
  • ";
    ------ Solution --------------------
    1. expressions contained in quotation marks will not be parsed.
    PHP code
    Echo"
  • ";

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