Home >Backend Development >PHP Tutorial >zend-studio10 - php中文乱码如何解决?

zend-studio10 - php中文乱码如何解决?

WBOY
WBOYOriginal
2016-06-06 20:44:231107browse

字符编码为utf-8
zend-studio10 - php中文乱码如何解决?

下图是浏览器的字符编码
zend-studio10 - php中文乱码如何解决?

为何显示出错?
zend-studio10 - php中文乱码如何解决?

回复内容:

字符编码为utf-8
zend-studio10 - php中文乱码如何解决?

下图是浏览器的字符编码
zend-studio10 - php中文乱码如何解决?

为何显示出错?
zend-studio10 - php中文乱码如何解决?

看你php文件本身的编码是什么,是不是错了。

在php文件中加入这一句:
header("Content-Type:text/html;charset=utf-8");

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