: This article mainly introduces the problem of modifying Chinese characters and not displaying phpcms content. if you are interested in PHP tutorials, please refer to it. Original site: http://www.111cn.net/wy/CMS/87635.htm
When editing an article in the background in the gbk version of phpcms2008sp4, the title and content are not displayed, for example:
After investigation, it is found that the htmlspecialchars parameter used by phpcms2008sp4 to process the document information causes the loss of Chinese characters (parameters must be supplemented in php5.4/5.5 ). Directly use htmlspecialchars ($ data [$ field], ENT_QUOTES) to return null values without any processing.
Solution:
Find in data \ cache_model \ content_form.class.php
$ Value = isset ($ data [$ field])? Htmlspecialchars ($ data [$ field], ENT_QUOTES ):'';
To:
$ Value = isset ($ data [$ field])? Htmlspecialchars ($ data [$ field], ENT_QUOTES ,'GB2312'):'';
The above section introduces the problem of modifying the Chinese text not to display phpcms content, including the GB2312 content, and hopes to help friends who are interested in PHP tutorials.