Home >php教程 >php手册 >PHP解决URL中文GBK乱码问题的两种方法

PHP解决URL中文GBK乱码问题的两种方法

WBOY
WBOYOriginal
2016-06-06 20:22:171335browse

对URL进行UrlEncode 处理,也可以通过iconv(utf-8, gb2312, $ret)对接收到的数据进行编码转换,需要的朋友可以参考下

一般情况下对URL进行UrlEncode 处理 , urlencode(),urldecode();

也可以通过iconv('utf-8', 'gb2312', $ret)对接收到的数据进行编码转换。 ,
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