Home  >  Article  >  Backend Development  >  关于zend studio 出现乱码问题的总结_php技巧

关于zend studio 出现乱码问题的总结_php技巧

WBOY
WBOYOriginal
2016-05-17 08:59:371047browse
出现乱码的地方大概有4个地方:

1、文件的编码方式(就是你新建文件的编码),这一点需要设置编辑器的编码方式。

2、页面没有指定浏览器编码的显示方式,这一点解决的办法是:
1,如果页面是.html需要设置
3、在新建数据库的时候指定数据库的编码,而且在链接数据库的时候需要加mysql_query("set names utf8");指定数据库输出的信息编码是utf-8的。

4、在ajax的时候,需要指定接受页面对接受数据的编码。用函数 iconv()。

总之:所有的编码都的统一。不管编码是utf-8或者是gbk等。
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