urlencode($url1) urldecode($url)
//对URL进行字符串编码和解码 $url1 = ‘https://www.baidu.com/uploade/img/123.png‘; echo $url1; echo ‘<br>‘; $url = urlencode($url1);//编码 输出https%3A%2F%2Fwww.baidu.com%2Fuploade%2Fimg%2F123.png echo $url; echo ‘<br>‘; $url = urldecode($url);//解码 输出 https://www.baidu.com/uploade/img/123.png echo $url;
原文地址:https://www.cnblogs.com/camg/p/11980297.html
时间: 2024-10-18 14:58:22