ecshop程序有时无故出现554fcae493e564ee0dc75bdf2ebf94ca错误代码,比如: 554fcae493e564ee0dc75bdf2ebf94camember_info|a:1:{s:4:"name";s:11:"member_info";}554fcae493e564ee0dc75bdf2ebf94ca554fcae493e564ee0dc75bdf2ebf94cacart_info|a:1:{s:4:"name
ecshop程序有时无故出现554fcae493e564ee0dc75bdf2ebf94ca错误代码,比如:
554fcae493e564ee0dc75bdf2ebf94camember_info|a:1:{s:4:"name";s:11:"member_info";}554fcae493e564ee0dc75bdf2ebf94ca
554fcae493e564ee0dc75bdf2ebf94cacart_info|a:1:{s:4:"name";s:9:"cart_info";}554fcae493e564ee0dc75bdf2ebf94ca一、首先清下后台缓存,看是否还会出现错误;
二、页面有程序方面错误,这是修改而导致的(只要有程序错误代码先解决掉、再清空缓存)。
三、2.7.3版本后,模板不支持php写法,而部分模板里(京东模板)带有diyfile.php处理php代码文件,所以有关php代码都无法编译加载出来。
解决办法:
打开includes/cls_template.php文件,找到fetch_str方法,改为如下代码:
function fetch_str($source)
{
if (!defined('ECS_ADMIN'))
{
$source = $this->smarty_prefilter_preCompile($source);
}
/*if(preg_match_all('~(<?(?:w+|=)?|?>|languages*=s*["']?php["']?)~is', $source, $sp_match))
{
$sp_match[1] = array_unique($sp_match[1]);
for ($curr_sp = 0, $for_max2 = count($sp_match[1]); $curr_sp < $for_max2; $curr_sp++)
{
$source = str_replace($sp_match[1][$curr_sp],'%%%SMARTYSP'.$curr_sp.'%%%',$source);
}
for ($curr_sp = 0, $for_max2 = count($sp_match[1]); $curr_sp < $for_max2; $curr_sp++)
{
$source= str_replace('%%%SMARTYSP'.$curr_sp.'%%%', ''."
", $source);
}
}*/
return preg_replace("/{([^}{
]*)}/e", "$this->select('\1');", $source);
}四、更早版本的ecshop出现这种问题
解决方法:同样打开includes/cls_template.php文件,注释如下代码:
$source = preg_replace("/<?[^><]+?>/i", "", $source);五、如果不是554fcae493e564ee0dc75bdf2ebf94ca错误提示,出现乱码那就是编码问题,需转换相应文件编码。
原文地址:ecshop页面列表页详情页出现乱码问题解决方法汇总, 感谢原作者分享。
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号