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

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

WBOY
Release: 2016-06-06 20:22:17
Original
1338 people have browsed it

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

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

也可以通过iconv('utf-8', 'gb2312', $ret)对接收到的数据进行编码转换。 ,
Related labels:
source:php.cn
Statement of this Website
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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template