ecshop2.7.3头部出现代码现象

来源:互联网 发布:2016年大数据薪资待遇 编辑:程序博客网 时间:2024/06/18 18:47

出错问题如下:

table('category')." where parent_id=".$cid." and is_show=1 ORDER BY sort_order ASC, cat_id ASC"; $res = $GLOBALS['db']->getAll($sql); foreach($res as $idx => $row) { $cat_arr[$idx]['id'] = $row['cat_id']; $cat_arr[$idx]['name'] = $row['cat_name']; $cat_arr[$idx]['url'] = build_uri('category', array('cid' => $row['cat_id']), $row['cat_name']); $cat_arr[$idx]['children'] = get_clild_list($row['cat_id']); } return $cat_arr; } else { return false; } } function get_clild_list($pid) { $sql_sub = "select * from ".$GLOBALS['ecs']->table('category')." where parent_id=".$pid." and is_show=1 ORDER BY sort_order ASC, cat_id ASC"; $subres = $GLOBALS['db']->getAll($sql_sub); if($subres) { foreach ($subres as $sidx => $subrow) { $children[$sidx]['id']=$subrow['cat_id']; $children[$sidx]['name']=$subrow['cat_name']; $children[$sidx]['url']=build_uri('category', array('cid' => $subrow

这种情况基本上都是从2.7.2升级补丁到2.7.3所导致的,2.7.2的数据库和2.7.3的结构还是有些差别的。我说说我的解决办法:

在后台中

 先备份数据,个人认为这样备份之后可能就是按照2.7.3的数据库的结构来存储了,然后再恢复备份,等于把数据库里的数据按照这种方法从2.7.2升级到了2.7.3(不知道这样理解的对不对,但是解决办法确实如此)

ecshop2.7.3头部出现代码现象 - cuiruijunphp - 格式化。。。
然后后台清下缓存,应该就可以了