Weaving dreams background system settings can not be saved solutions Chinese parameters in PHP5.4 environment

In doing useless PHP5.4 environment when Dede background, weaving dreams 58 has not encountered this problem, yesterday to upload a new template to find space to test the basic parameters of the background of the system set up in all Chinese content can not be saved, on this issue, in fact, previously I heard of, knowledge has not been met, it is because the problem site encoding, UTF-8 version of the background weaving dreams do not have this problem in PHP5.4 environment, the only version of the GBK backstage before this problem, we need to step to resolve this issue to the form of the Chinese transcoding.

Weaving dreams background system settings can not be saved solutions Chinese parameters in PHP5.4 environment

First, the basic parameters of the background can not save Chinese solution:

Open dede \ templets \ sys_info.htm, lookup code (about 182 lines and 192 lines, note that there are two)

htmlspecialchars($row['value'])

They are replaced by:

htmlspecialchars($row['value'],ENT_COMPAT ,'GB2312')
 

If you find that there are other pages also have this problem, empathy, open the corresponding template file, and then search for the same character replacement can be solved.

Second, the solution to the editor of the Chinese can not be saved:

Open include / ckeditor / ckeditor_php5.php, lookup code (in about 137 lines)

dede_htmlspecialchars($value)
 

changed to

dede_htmlspecialchars($value, ENT_COMPAT, 'GB2312' )
 

Third, the article posted solutions page does not display the label:

Open dede / article_add.php and dede / article_edit.php, lookup code (line 101 and lines 108, respectively)

dede_htmlspecialchars(cn_substrR($title,$cfg_title_maxlen))

They are the following:

dede_htmlspecialchars(cn_substrR($title,$cfg_title_maxlen),ENT_COMPAT ,'GB2312')
 

Fourth, the Chinese tag solution can not be displayed:

Open dede / templets / tags_main.htm, lookup code (probably in the first 82 rows)

htmlspecialchars($fields['tag'])

change into:

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

These four solutions can basically get gbk version of Dede background does not show Chinese in PHP5.4 environmental issues, in fact, the addition of a transcoding it, the principle is very simple, if there is a problem somewhere else, you can refer to this way to do similar modifications.

 

Guess you like

Origin www.cnblogs.com/jizl/p/12015427.html