Home > Backend Development > PHP Tutorial > 帮小弟我看看简单php乱码原因,无语

帮小弟我看看简单php乱码原因,无语

WBOY
Release: 2016-06-13 11:28:44
Original
1058 people have browsed it

帮我看看简单php乱码原因,无语!
1.打开EditPlus

2.新建一个空白php文件

3.写入

<?php<br />echo "很好";<br />?>
Copy after login


4.保存为utf-8格式

5.访问刚刚的页面输出寰堝ソ,直接是乱码。


据我知道的原因是:应该保存成utf-8+BOM格式,才能显示中文。

现在问题来了:
1.从我学php开始就知道php要保存成utf-8无BOM模式,好像一起没出什么中文乱码问题?
2.我查看了一些cms,框架的php文件,全部是utf-8无BOM模式,他们是怎么回避上面的无BOM模式中文乱码问题的?


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