Weaving dream GBK version under php5.4 system basic parameter settings cannot save Chinese and do not display in Chinese under editor.

Source: Internet
Author: User
Dream Weaving system I have been in the UTF8 version, recently tested a set of templates, but uploaded to the server to find the system basic settings can not be saved in Chinese, the internet did not find a good way to look at yourself, found that the problem of website coding, My UTF8 dream is no problem under the php5.4, so I want to transcode the characters in my form.

Background-System basic parameters cannot save the Chinese modification method:
Dede\templets\sys_info.htm Inside Search
Htmlspecialchars ($row [' Value '])
Replaced by
Htmlspecialchars ($row [' Value '],ent_compat, ' gb2312′ ')

If you find that there are other pages, there is no way to save Chinese, it is best to search for Htmlspecialchars ($row [' value ') in Dreamweaver, and then bulk replace Htmlspecialchars ($row [' Value '], Ent_compat, ' gb2312′ ', so you can ensure that the system's form is not a problem.

However, this method of modification, the editor of the Chinese No way, but also to modify the editor, the method is:

include/ckeditor/ckeditor_php5.php file
Find Code
$out = "<textarea name=\" ". $name. “\”” . $attr. ">". Htmlspecialchars ($value). "</textarea>\n";
Change to:
$out = "<textarea name=\" ". $name. “\”” . $attr. ">". Htmlspecialchars ($value, Ent_compat, ' gb2312′). "</textarea>\n";

There are also labels that are not displayed and are modified as follows:

1, dede/article_add.php and dede/article_edit.php will

$title = Htmlspecialchars (CN_SUBSTRR ($title, $cfg _title_maxlen));

Change into

$title = Htmlspecialchars (CN_SUBSTRR ($title, $cfg _title_maxlen), Ent_compat, ' GB2312 ');

After all this, we found that the core-batch maintenance-tag tag management in the Chinese label all do not show, it is really troublesome, modify the method:



Open/dede/templets/tags_main.htm

Found it:

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

Replaced by

$fields [' tag '] = Htmlspecialchars ($fields [' tag '],ent_compat, ' gb2312′ ');

With this modification, the tag tag is displayed.

Such a modification, in php5.4 under the GBK version of the Dream will not appear coding problem.


Related to not show where there are editor content, system basic parameters, link module, please refer to the modification.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.