解決Call to undefined function dede_htmlspecialchars()問題
但織夢(mèng)開啟詳細(xì)錯(cuò)誤如下圖后:Call to undefined function dede_htmlspecialchars()

2015年6月18日更新的新版本的織夢(mèng)5.7,為了兼容php5.4+,修改了common.fuc.php,可能有些模板也改動(dòng)過這個(gè)文件,這樣會(huì)導(dǎo)致在安裝模板時(shí),common.fuc.php文件被覆蓋,從而在發(fā)布文章時(shí),編輯框的位置出現(xiàn)“Call to undefined function dede_htmlspecialchars()”這樣的錯(cuò)誤提示。
解決辦法如下:
打開common.fuc.php,搜索“function RunApp”,在這個(gè)函數(shù)的上面添加織夢(mèng)新版本新增的函數(shù):dede_htmlspecialchars
function dede_htmlspecialchars($str) {
global $cfg_soft_lang;
if (version_compare(PHP_VERSION, ‘5.4.0’, ‘<‘)) return htmlspecialchars($str);
if ($cfg_soft_lang==’gb2312′) return htmlspecialchars($str,ENT_COMPAT,’ISO-8859-1′);
else return htmlspecialchars($str);
}