About Rawurldecode PHP automatic decoding

Source: Internet
Author: User

Comment posted: 2007-12-05 12:16:20

Find the information on the Internet if the parameters are passed through JavaScript, if the parameters are encoded using the encodeURIComponent function, in PHP need to use the Rawurldecode function decoding, But when I was doing the experiment, I found that the encodeuricomponent encoded strings in PHP were displayed correctly (and the printed text is displayed normally after decoding with Rawurldecode). I think it is not Apache or PHP where this control option can be automatically decoded?   Ask tall man pointing? URI encoding is canonical, and many Web servers are now automatically encoded and decoded.
Http://www.ietf.org/rfc/rfc2396.txt
The format is: "%" hex hex
If decoded once, no%xx of course decoding also no meaning, but if the automatic decoding, do not own manual decoding, superfluous, but also may be wrong.
There is no need to make an option to control the decoding, like your home phone, no idiot will say to the telecom do not turn the other person's voice into sound, pass an audio stream to me, unless you want to make a phone call.
If you really want to decode yourself, do not use PHP, you write an Apache module, all of your own decoding, even including HTTP packets.

Automatic decoding, the encoding should be handled by the PHP module itself, because Perl does not automatically decode, you need to call the CGI module decoding. No decoding is required with encodeuricomponent. Direct use, Rhino book recommended to use this ...
Why?? See Http://www.google.cn/search?hl=zh-CN&q=encodeURIComponent&btnG=Google+%E6%90%9C%E7%B4%A2&meta=

As for the encodeURIComponent encoded, you use Rawurldecode decoding or normal, because the content is not decoded ...

Rawurldecode
Decoding of encoded URL strings (PHP 3, PHP 4, PHP 5)

String Rawurldecode (String str)

Description
Returns a string that is replaced by a sequence of percent semicolons (%) followed by a two-digit hexadecimal number in this string.

About Rawurldecode PHP automatic decoding

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.