关于url碥码
<br />$str="%C3%F7%D0%C7%CD%AC%BF%EE%D7%B0%B1%B8";<br />$str=urldecode($str); <br />
如果我这上面两行代码保存在gbk就显示正示,如果保存成utf就显示不正常,这是什么为什么呢?
代码应该怎么定在在保存为utf的情况下正常呢
------解决方案--------------------可用iconv把gbk轉utf8
<br />$str="%C3%F7%D0%C7%CD%AC%BF%EE%D7%B0%B1%B8";<br />$str=urldecode($str); <br />$str=iconv("GBK", "UTF-8", $str);
echo $str;
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn