Table of Contents
回复讨论(解决方案)
Home Backend Development PHP Tutorial dede 发布静态页面乱码问题

dede 发布静态页面乱码问题

Jun 23, 2016 pm 01:51 PM
dede Garbled characters release static page

dede是gbk版本的
模板也是gb2312
生成静态页面后打开,浏览器默认选中utf编码,出现乱码,把浏览器编码改为gbk,显示就正常了
刚换了服务器,模板都是倒过来的,没有动过
什么原因呢


回复讨论(解决方案)

设置下php.ini 文件 default_charset = “gbk”

设置下php.ini 文件 default_charset = “gbk”

需要重启php么?


设置下php.ini 文件 default_charset = “gbk”

需要重启php么?
嗯,重启一下APACHE。



设置下php.ini 文件 default_charset = “gbk”

需要重启php么?
嗯,重启一下APACHE。 不行,重启后重新发布了还是乱码




设置下php.ini 文件 default_charset = “gbk”

需要重启php么?
嗯,重启一下APACHE。 不行,重启后重新发布了还是乱码
本地是没问题的是吗?




设置下php.ini 文件 default_charset = “gbk”

需要重启php么?
嗯,重启一下APACHE。 不行,重启后重新发布了还是乱码
生成的静态页面是以gbk来解析的吗?





设置下php.ini 文件 default_charset = “gbk”

需要重启php么?
嗯,重启一下APACHE。 不行,重启后重新发布了还是乱码
本地是没问题的是吗? 是在linux系统上的






设置下php.ini 文件 default_charset = “gbk”

需要重启php么?
嗯,重启一下APACHE。 不行,重启后重新发布了还是乱码
本地是没问题的是吗? 是在linux系统上的
Windows的默认编码为GBK,Linux的默认编码为UTF-8。在Windows下编辑的中文,在Linux下显示为乱码。为了解决此问题,修改Linux的默认编码为GBK。方法如下:

方法1:

vi   /etc/sysconfig/i18n

LANG="zh_CN.GBK"
SUPPORTED="zh_CN.UTF-8:zh_CN:zh"
SYSFONT="latarcyrheb-sun16"

方法2:
vi /etc/profile

export LC_ALL="zh_CN.GBK"
export LANG="zh_CN.GBK"

设置下php.ini 文件 default_charset = “gbk”

问题解决了,工作人员倒数据用的其他软件,可能编码被改变了,重新倒了一遍就好了,谢谢你的各种方法!
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

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to publish works on Xiaohongshu How to publish articles and pictures on Xiaohongshu How to publish works on Xiaohongshu How to publish articles and pictures on Xiaohongshu Mar 22, 2024 pm 09:21 PM

How to publish works on Xiaohongshu How to publish articles and pictures on Xiaohongshu

Why can't Xiaohongshu publish videos of works? How does it publish its work? Why can't Xiaohongshu publish videos of works? How does it publish its work? Mar 21, 2024 pm 06:36 PM

Why can't Xiaohongshu publish videos of works? How does it publish its work?

Why can't Xiaohongshu be released? What should I do if the content published by Xiaohongshu cannot be displayed? Why can't Xiaohongshu be released? What should I do if the content published by Xiaohongshu cannot be displayed? Mar 21, 2024 pm 07:47 PM

Why can't Xiaohongshu be released? What should I do if the content published by Xiaohongshu cannot be displayed?

How to delete Xiaohongshu releases? How to recover after deletion? How to delete Xiaohongshu releases? How to recover after deletion? Mar 21, 2024 pm 05:10 PM

How to delete Xiaohongshu releases? How to recover after deletion?

How to publish works on Xiaohongshu app? Tutorial on publishing works on Xiaohongshu app in five minutes How to publish works on Xiaohongshu app? Tutorial on publishing works on Xiaohongshu app in five minutes Mar 12, 2024 pm 05:10 PM

How to publish works on Xiaohongshu app? Tutorial on publishing works on Xiaohongshu app in five minutes

When is the best time to publish Xiaohongshu? Where does it post the most traffic recommendations from? When is the best time to publish Xiaohongshu? Where does it post the most traffic recommendations from? Mar 21, 2024 pm 08:11 PM

When is the best time to publish Xiaohongshu? Where does it post the most traffic recommendations from?

How to publish Xiaohongshu video works? What should I pay attention to when posting videos? How to publish Xiaohongshu video works? What should I pay attention to when posting videos? Mar 23, 2024 pm 08:50 PM

How to publish Xiaohongshu video works? What should I pay attention to when posting videos?

How to publish works on Douyin How to publish works How to publish works on Douyin How to publish works Mar 13, 2024 am 08:10 AM

How to publish works on Douyin How to publish works

See all articles