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

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

WBOY
Release: 2016-06-06 20:44:23
Original
1110 people have browsed it

字符编码为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");

Related labels:
php
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