<u>复制代码</u> 代码如下:<br><?php <BR>$url = "http://www.bitsCN.com"; <br>echo urlencode($url); //输出编码后的字符串 <br>?> <br><br><br><u>复制代码</u> 代码如下:<br><?php <BR>$url = "http://www.bitsCN.com"; <br>$newurl = urlencode($url); //首先对$url进行编码 <br>echo urldecode($newurl); //输出解码后的字符串 <br>?> <br>