POST TIME:2021-05-23 01:15
2015年6月18日更新的新版本的織夢5.7,為了兼容php5.4+,修改了common.func.php,可能有些模板也改動過這個文件,這樣會導致在安裝模板時,common.fuc.php文件被覆蓋,從而在發布文章時,編輯框的位置出現“Call to undefined function dede_htmlspecialchars()”這樣的錯誤提示。
解決辦法如下:
打開common.func.php,搜索“function RunApp”,在這個函數的上面添加織夢新版本新增的函數: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); } |
織夢58覺得還是升級為php6.5更兼容