我最近在使用urlencode对字符串进行编码时发现它将空格字符串编码为了+,但是如果你用rawurlencode来编码,空格字符串就会变为%20。而且在浏览器里输入空格后,它都会将其转化为%20。

这两者有什么区别吗?后端服务器在接受这两种编码请求时会有和不同呢?
我试着将http://zh.wikipedia.org/wiki/Internet%20Explorer%207网址替换为http://zh.wikipedia.org/wiki/Internet+Explorer+7,发现就无法识别了。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
From Wikipedia (emphasis and link added):
来源:
http://stackoverflow.com/questions/16...
其他参考:
http://stackoverflow.com/questions/12...