PHP接收GET中文参数乱码解决办法

WBOY
Release: 2016-06-13 13:02:03
Original
788 people have browsed it

PHP接收GET中文参数乱码解决方法

PHP接收GET中文参数乱码解决方法

方案1:

$str = iconv("gb2312","utf-8",$str);

方案2:

mb_convert_encoding($str, "utf-8", "gb2312");

希望本文对那些因为编码问题而抓破头的PHPer们有所帮助 :)

?

本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/supxiaoqiang1/archive/2010/07/24/5760785.aspx

Related labels:
str
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 Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!