Home  >  Article  >  Backend Development  >  php中文支持有关问题-小弟我用链接提交中文字段。接收到的是乱码。

php中文支持有关问题-小弟我用链接提交中文字段。接收到的是乱码。

WBOY
WBOYOriginal
2016-06-13 13:00:54852browse

php中文支持问题--我用链接提交中文字段。接收到的是乱码。。。。。
php中文支持问题--我用链接提交中文字段。接收到的是乱码。。。。。


用链接提交:http://localhost/eat/test.php?act=FindRes&name=abc接收到不中文cba

程序: $name=$_REQUEST['name'];
$address=$_GET['address'];
echo $name;die;

页面显示:abc???????????cba

PS。。已经有这一行了。。。

  


    
  
------解决方案--------------------
虽然你  了
但你的程序文件没有按 utf-8 编码保存
------解决方案--------------------
引用:
虽然你  了
但你的程序文件没有按 utf-8 编码保存

支持~
------解决方案--------------------
引用:
虽然你  了
但你的程序文件没有按 utf-8 编码保存


+1
------解决方案--------------------
用gbk吧

------解决方案--------------------
页面显示:abc???????????cba
这多半是 gbk 字符在 utf-8 页面中的表现
------解决方案--------------------
你发送页面 和 接收页面的编码都是一致的吗?
------解决方案--------------------
将的接受过来的值自己打印出来看看,不行的话urlencode试试
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