Home  >  Article  >  Backend Development  >  PHP接收GET中文参数乱码解决办法

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

WBOY
WBOYOriginal
2016-06-13 13:02:03789browse

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

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