php URL编码解码函数代码,后面都有详细的说明。最近的php将会让你学到更多。
复制代码 代码如下:
<?php
$url = "http://www.ruanchen.com";
echo urlencode($url); //输出编码后的字符串
?>
复制代码 代码如下:
<?php
$url = "http://www.ruanchen.com";
$newurl = urlencode($url); //首先对$url进行编码
echo urldecode($newurl); //输出解码后的字符串
?>