An elusive coding problem. Seldom posts

Source: Internet
Author: User
Tags urlencode
An elusive coding problem. Seldom posts
Strange, I Apache + window with URL in the parameter pass to complete normal
Test server Linux+apache The same script with the same URL (with the Chinese parameter) passed, there is a garbled problem.
After that, in the test server directory, the incoming. htaccess write Adddefaultcharset Utf-8 unhelpful.

My PHP and HTML page encoding is all unified. It's all utf-8.100 cents.

------Solution--------------------
Use UrlEncode to encode first, then decode with UrlDecode.
It is estimated that Linux is an English version of OS.
------Solution--------------------
Don't really know how to help LZ top
------Solution--------------------
Change the Linux default code to try!
------Solution--------------------
Url?urlencode (params), then decode with UrlDecode. Or you find urldecode don't need it at all.

------Solution--------------------
In the URL with the Chinese parameter passed to URL encoding
a.php
PHP Code
$name = "Test"; $encodeName =urlencode ($name); echo "url pass parameter test";
------Solution--------------------
Learn
  • 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.