phped 的debugger调试,遇到变量值为中文时,显示乱码 的解决方案_PHP教程

WBOY
Release: 2016-07-13 17:46:14
Original
1053 people have browsed it

有如下待调试的php代码 :

\

在调试分析器中竟然乱码显示如下:

\

经过各方面摸索,找到解决方案如下:

你需要另外对debugger编码设置,有个全局设置,也有针对每个项目的个性化设置,

一般情况下,全局设置,我们把它设置为utf-8格式,如下图所示:

\

但此编码格式必须和具体的项目编码格式一致,否则就会出现中文值为乱码情况。

如果你的项目为“gbk”编码格式,还需要额外的对这个项目设置debugger为gbk编码,操作如下:

1>.右键单击项目 --> 选“Properties”:

\

2>.选中“Debugger”选项卡,如下设置编码格式 即可:

注意,如果你的项目编码为“utf-8”,这里就选“utf-8”,如果是“gbk”,那就选“gbk”。

\

再次启动调试,正常显示变量值为中文,如下图所示:

\

摘自 钱途无梁 blog

www.bkjia.com true http://www.bkjia.com/PHPjc/478611.html TechArticle 有如下待调试的php代码 : 在调试分析器中竟然乱码显示如下: 经过各方面摸索,找到解决方案如下: 你需要另外对debugger编码设置,有个...
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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!