Refeshop > crypto > Assistant >
DedeCMS后台无法保存中文字符
时间:2024-04-01 03:35
来源 :Refeshop

一、后台-系统基本参数无法保存中文#

在项目目录 dede / templets / sys_info.htm 中搜索:

htmlspecialchars($row[‘value’])

替换为:

htmlspecialchars($row[‘value’],ENT_COMPAT ,’GB2312′)

若其他页面也无法保存中文,则需要整站搜索并批量替换。

二、编辑器中无法保存中文#

在项目目录 include / ckeditor / ckeditor_php5.php 中搜索:

$out = "<textarea name=\"" . $name . "\"" . $attr . ">" .htmlspecialchars($value). "</textarea>\n";

替换为:

$out = "<textarea name=\"" . $name . "\"" . $attr . ">" .htmlspecialchars( $value, ENT_COMPAT, 'GB2312' ). "</textarea>\n";

三、标签中无法保存中文#

在项目目录 dede / article_add.php 和 dede / article_edit.php 中搜索:

$title = htmlspecialchars(cn_substrR($title,$cfg_title_maxlen));

替换为:

$title = htmlspecialchars(cn_substrR($title,$cfg_title_maxlen),ENT_COMPAT ,'GB2312');

四、核心-批量维护-tag标签管理中无法保存中文#

在项目目录 dede/templets/tags_main.htm 中搜索:

$fields['tag'] = htmlspecialchars($fields['tag']);

替换为:

$fields['tag'] = htmlspecialchars($fields['tag'],ENT_COMPAT ,'GB2312');

 

搞定 ~,这样在GBK版下的织梦就不会出现编码的问题了。

We are a non-profit organization dedicated to providing the most comprehensive and authentic information about brokers to the public, free of charge. Our mission is to present the most genuine aspects of brokers and offer the best comparison tools to help you thoroughly evaluate each broker. We welcome and encourage every visitor to share their experiences with any broker.More

展开

24*7 Live Chat

  • Chat 1
  • Chat 2
  • Chat 3
  • Join our community
  • Chat4send message to me
  • QQ:95388812