首页 > 编程 > PHP > 正文

php URL编码解码函数

2019-11-17 04:12:21
字体:
来源:转载
供稿:网友

<?php

$url =”http://www.2881.com“;
echo urlencode($url);                           //输出编码后的字符串
?>
<?php

$url = “http://www.2881.com“;
$newurl = urlencode($url);                          //首先对$url进行编码
echo urldecode($newurl);                            //输出解码后的字符串
?>


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表