Discover encodeuricomponent php decode, include the articles, news, trends, analysis and practical advice about encodeuricomponent php decode on alibabacloud.com
In JS, encodeURIComponent is used to encode Chinese characters. in PHP, iconv (UTF-8, gb2312, $ q) is used, gb2312 depends on your actual application. if you still don't understand why do you use php to decode the encodeURIComponent function in the
In JS, encodeURIComponent is used to encode Chinese characters. in PHP, iconv is used (after the encodeURIComponent function in JS is used to encode Chinese characters, how can I use php to decode it ??
Prerequisites: The Chinese characters before
Turn from: http://blog.csdn.net/ljb2010_/archive/2010/12/13/6073507.aspx
Coding is often used in AJAX development, especially in Chinese. So what did Encodeuri,encodecomponent do? Why are there encodeURI, and encodeuricomponent?
Knowledge URI
How does the encodeURIComponent function in JS decode Chinese characters using php ??Prerequisites: The Chinese characters before encoding may be gbk, gb2312, UTF-8, and so on.Copy codeThe Code is as follows:Urldecode ()Iconv () EncodeURIComponent
So the JS script has been re-examined a bit. In the new URL encoding, found that the format of the Web page encoding for JS has a great impact, write a little herebecause of the new system, the JS script has been re-examined. In the new URL encoding,
Because of the new system, so for the JS script again studied again. In the new URL encoding, found that the format of the page encoding for JS is very large, write a little here.
{var b=siteurl+this.actionurl+ (this.type=== "All"? ": This.type) +"
Because of the need for a new system, we have re-studied JS scripts. During the new URL encoding, we found that the webpage encoding format has a great impact on JS. Here we will write a little bit.
{Var B = siteUrl + this. actionUrl + (this. type =
When using AJAX to interact with the background, we often encode and decode Chinese, and for JS there are two functions: encodeuricomponent for encoding, decodeuricomponent for decoding. For PHP in the background, there are two corresponding
Php URL decode function corresponding to JavaScript URL encode function
1. Try using JS's encodeURI (), encodeURIComponent (), Escape () function for URL encoding,2. Using PHP UrlDecode function decoding, the results can not be decoded into normal
Comment posted: 2007-12-05 12:16:20Find 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
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.