in PHP UrlEncode () function is to convert the Chinese into a string encoding, so that does not cause the Chinese URL in the browser open garbled or error problems, let me introduce you in the use of UrlEncode () coding is some specific
The urlencode and rawurlencode functions perform some processing on URLs, but they are different during processing. Especially for some special characters, they are completely different, the following is a detailed example of the two url Processing
In PHP, functions such as urlencode (), urldecode (), rawurlencode (), and rawurldecode () are provided to solve the URL encoding and decoding problem.
Understand urlencode:
Urlencode: a pointer to the Chinese characters in the url of a Web page.
Some time ago said that they encountered a "URL plus throw error" bug, the cause of this bug is that they use the UrlEncode function in the URL, the function will convert the space into a plus sign, which will cause the URL parsing error, and the
Some time ago, I encountered a "URL plus cause error" BUG. The cause of this bug is that I used the urlencode function in the URL, which converts spaces to the plus signs, in this case, the URL parsing error occurs, and the space can be parsed only
PHP Function details: urlencode ()
The urlencode function encodes the input string parameters. The returned string contains -. ", all non-alphanumeric characters are replaced with a semicolon (%) followed by two hexadecimal numbers, and
Introduction: This is a detailed page on PHP's urlencode () function. It introduces PHP, related knowledge, skills, experience, and some PHP source code.
Class = 'pingjiaf' frameborder = '0' src = 'HTTP: // biancheng.dnbc?info/pingjia.php? Id = 343
Understand urlencode:Urlencode: a pointer to the Chinese characters in the URL of a Web page. The most common method is to enter Chinese Characters in search engines such as Baidu and Google, generate a webpage URL that has passed the encode.
UrlEncode: Refers to the Web page URL in a code conversion method, the most common is Baidu, Google and other search engines to enter the Chinese query time, generate the URL of the Web page after encode.
There are generally two kinds of urlencode,
There are generally two kinds of urlencode, one is the traditional based on GB2312 encode (Baidu, Yisou, etc.), the other is based on UTF-8 encode (Google, Yahoo and other uses).
This tool implements the encode and decode of two different
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.