Home  >  Article  >  php教程  >  ecshop页面列表页详情页出现乱码问题解决方法汇总

ecshop页面列表页详情页出现乱码问题解决方法汇总

WBOY
WBOYOriginal
2016-06-06 20:14:051562browse

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('~(|language\s*=\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 select('\\1');", $source);
}

四、更早版本的ecshop出现这种问题
解决方法:同样打开includes/cls_template.php文件,注释如下代码:

$source = preg_replace("//i", "", $source);

五、如果不是554fcae493e564ee0dc75bdf2ebf94ca错误提示,出现乱码那就是编码问题,需转换相应文件编码。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn