位置: 编程技术 - 正文
推荐整理分享PHP:urldecode()的用法_url函数(php url编码转换),希望有所帮助,仅作参考,欢迎阅读内容。
文章相关热门搜索词:php urldecode,phpurl编码,php urldecode,php中urlencode,php中url什么意思,php中url什么意思,php urldecode,php urldecode,内容如对您有帮助,希望把文章链接给更多的朋友!
(PHP 4, PHP 5)
urldecode — 解码已编码的 URL 字符串
说明 string urldecode ( string $str )解码给出的已编码字符串中的任何 %##。 加号(+)被解码成一个空格字符。
参数str
要解码的字符串。
返回值返回解码后的字符串。
范例
Example #1 urldecode() 示例
<?php$query="my=apples&are=green+and+red";foreach(explode('&',$query)as$chunk){$param=explode("=",$chunk);if($param){printf("Valueforparameter"%s"is"%s"<br/>n",urldecode($param[0]),urldecode($param[1]));}}?> 注释 Warning超全局变量 $_GET 和 $_REQUEST 已经被解码了。对 $_GET 或 $_REQUEST 里的元素使用 urldecode() 将会导致不可预计和危险的结果。
参见urlencode() - 编码 URL 字符串 rawurlencode() - 按照 RFC 对 URL 进行编码 rawurldecode() - 对已编码的 URL 字符串进行解码 »RFC
PHP:rawurlencode()的用法_url函数 rawurlencode(PHP4,PHP5)rawurlencode按照RFC对URL进行编码说明stringrawurlencode(string$str)根据RFC编码指定的字符。参数str要编码的URL。返回值返回字符串,此字
PHP:rawurldecode()的用法_url函数 rawurldecode(PHP4,PHP5)rawurldecode对已编码的URL字符串进行解码说明stringrawurldecode(string$str)返回字符串,此字符串中百分号(%)后跟两位十六进制数的序列都
PHP:get_headers()的用法_url函数 get_headers(PHP5)get_headers取得服务器响应一个HTTP请求所发送的所有标头说明arrayget_headers(string$url[,int$format=0])get_headers()返回一个数组,包含有服务器响应一
标签: php url编码转换
本文链接地址:https://www.jiuchutong.com/biancheng/280579.html 转载请保留说明!友情链接: 武汉网站建设