Home > Backend Development > PHP Tutorial > php urlencode 和 urldecode

php urlencode 和 urldecode

WBOY
Release: 2016-07-29 09:06:54
Original
1093 people have browsed it

php 的一组url的传递之间的编码和解码函数

<code><span>$str</span> = <span>"AgAAAA**AQAAAA**aAAAAA**mIm"</span>;
<span>$str</span> = urlencode(<span>$str</span>); <span>//</span>编码</code>
Copy after login
<code><span>$response</span> = urldecode(<span>$_response</span>[<span>'str'</span>]);  <span>//</span>解码
不要忘记了,经过游览器的传递。 要处理反斜杠啊
<span>$response</span> = str_replace(<span>"\\"</span>, <span>""</span>, <span>$response</span> );</code>
Copy after login
').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });

以上就介绍了php urlencode 和 urldecode,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template