PHP群:95885625 Hbuilder+MUI群:81989597 站长QQ:634381967
    您现在的位置: 首页 > CMS教程 > ecshop教程 > 正文

    ecshop Warning: Illegal string offset 'cat_name' in

    作者:admin来源:网络浏览:时间:2020-09-30 00:07:50我要评论
    导读:ecshop自定义栏目里,添加栏目报错Warning: Illegal string offset 'cat_name' in D:\wamp\www\yjy_shop\admin\navigator.ph...
    ecshop自定义栏目里,添加栏目报错Warning: Illegal string offset 'cat_name' in D:\wamp\www\yjy_shop\admin\navigator.php on line 382

    ecshop Warning: Illegal string offset 'cat_name' in



    解决办法如下:

    找到navigator.php文件下的function get_sysnav()

    替换成

    function get_sysnav()
    {
        global $_LANG;
        $sysmain = array(
            array($_LANG['view_cart'],'flow.php'),
            array($_LANG['pick_out'],'pick_out.php'),
            array($_LANG['group_buy_goods'],'group_buy.php'),
            array($_LANG['snatch'],'snatch.php'),
            array($_LANG['tag_cloud'],'tag_cloud.php'),
            array($_LANG['user_center'],'user.php'),
            array($_LANG['wholesale'], 'wholesale.php'),
            array($_LANG['activity'], 'activity.php'),
            array($_LANG['myship'], 'myship.php'),
            array($_LANG['message_board'], 'message.php'),
            array($_LANG['quotation'], 'quotation.php'),
            );
     
        $sysmain[] = array('-','-');
     
        $catlist = array_merge(cat_list(0, 0, false), array('-'), article_cat_list(0, 0, false));
     
     
        foreach($catlist as $key => $val)
        {
     
     if(is_array($val))
     {
            $val["view_name"] = $val["cat_name"];
            for($i=0;$i<$val['level'];$i++)
            {
                $val["view_name"] = '&nbsp;&nbsp;&nbsp;&nbsp;' . $val["view_name"];
            }
            $val["url"] = str_replace( '&amp;', '&', $val["url"]);
            $val["url"] = str_replace( '&', '&amp;', $val["url"]);
            $sysmain[] = array($val["cat_name"], $val["url"], $val["view_name"]);
        }
    }
        return $sysmain;
    }

    转载请注明(B5教程网)原文链接:https://b5.mxunkeji.com/content-104-2006-1.html
    相关热词搜索: