lic function get_category_tree() { if(isset($this->data['category_tree'])) { return $this->data['category_tree']; } $this->data['category_tree'] = array(); $tmp = $this->get_category_db(); // 格式化为树状结构 (会舍弃不合格的结构) foreach($tmp as $v) { $tmp[$v['upid']]['son'][$v['cid']] = &$tmp[$v['cid']]; } $this->data['category_tree'] = isset($tmp['0']['son']) ? $tmp['0']['son'] : array(); // 格式化为树状结构 (不会舍弃不合格的结构) // foreach($tmp as $v) { // if(isset($tmp[$v['upid']])) $tmp[$v['upid']]['son'][] = &$tmp[$v['cid']]; // else $this->data['category_tree'][] = &$tmp[$v['cid']]; // } return $this->data['category_tree']; } // 获取分类 (二维数组) public function get_category() { if(isset($this->data['category_array'])) { return $this->data['category_array']; } $arr = $this->get_category_tree(); return $this->data['category_array'] = $this->to_array($arr); } // 递归转换为二维数组 public function to_array($data, $pre = 1) { static $arr = array(); foreach($data as $k => $v) { $v['pre'] = $pre; if(isset($v['son'])) { $arr[$v['mid']][] = $v; self::to_array($v['son'], $pre+1); }else{ $arr[$v['mid']][] = $v; } } return $arr; } // 获取模型下级所有列表分类的cid public function get_cids_by_mid($mid) { $k = 'cate_by_mid_'.$mid; if(isset($this->data[$k])) return $this->data[$k]; $arr = $this->runtime->xget($k); if(empty($arr)) { $arr = $this->get_cids_by_upid(0, $mid); $this->runtime->set($k, $arr); } $this->data[$k] = $arr; return $arr; } // 获取频道分类下级列表分类的cid public function get_cids_by_upid($upid, $mid) { $arr = array(); $tmp = $this->get_category_db(); if($upid != 0 && !isset($tmp[$upid])) return FALSE; foreach($tmp as $k => $v) { if($v['mid'] == $mid) { $tmp[$v['upid']]['son'][$v['cid']] = &$tmp[$v['cid']]; }else{ unset($tmp[$k]); } } if(isset($tmp[$upid]['son'])) { foreach($tmp[$upid]['son'] as $k => $v) { if($v['type'] == 1) { $arr[$k] = isset($v['son']) ? self::recursion_cid($v['son']) : array(); }elseif($v['type'] == 0) { $arr[$k] = 1; } } } return $arr; } // 递归获取下级分类全部 cid public function recursion_cid(&$data) { $arr = array(); foreach($data as $k => $v) { if(isset($v['son'])) { $arr2 = self::recursion_cid($v['son']); $arr = array_merge($arr, $arr2); }else{ if($v['type'] == 0) { $arr[] = intval($v['cid']); } } } return $arr; } // 获取分类下拉列表HTML (内容发布时使用) public function get_cidhtml_by_mid($_mid = 0, $cid = 0, $tips = '选择分类', $in_cid = array(), $other = '') { $category_arr = $this->get_category(); $s = ''; return $s; } // 获取上级分类的 HTML 代码 (只显示频道分类) public function get_category_upid($mid, $upid = 0, $noid = 0) { $category_arr = $this->get_category(); $s = ''; if(isset($category_arr[$mid])) { foreach($category_arr[$mid] as $v) { // 不显示列表的分类 if($mid> 1 && $v['type'] == 0) continue; // 当 $noid 有值时,排除等于它和它的下级分类 if($noid) { if(isset($pre)) { if($v['pre'] > $pre) continue; else unset($pre); } if($v['cid'] == $noid) { $pre = $v['pre']; continue; } } $s .= ''; } } return $s; } // 获取指定分类的 mid (如果 cid 为空,则读第一个分类的 mid) public function get_mid_by_cid($cid) { if($cid) { $arr = $this->get($cid); }else{ $arr = $this->get_category(); if(empty($arr)) return 2; $arr = current($arr); $arr = current($arr); } return $arr['mid']; } // 获取分类当前位置 public function get_place($cid) { $p = array(); $tmp = $this->get_category_db(); while(isset($tmp[$cid]) && $v = &$tmp[$cid]) { array_unshift($p, array( 'cid'=> $v['cid'], 'name'=> $v['name'], 'url'=> $this->category_url($v, 0, array('url_path'=>1)) )); $cid = $v['upid']; } return $p; } // 获取分类缓存合并数组 public function get_cache($cid) { $k = 'cate_'.$cid; if(isset($this->data[$k])) return $this->data[$k]; $arr = $this->runtime->xget($k); if(empty($arr)) { $arr = $this->update_cache($cid); } $this->data[$k] = $arr; return $arr; } // 更新分类缓存合并数组 public function update_cache($cid) { $k = 'cate_'.$cid; $arr = $this->get($cid); if(empty($arr)) return FALSE; $arr['place'] = $this->get_place($cid); // 分类当前位置 $arr['topcid'] = $arr['place'][0]['cid']; // 顶级分类CID $arr['table'] = $this->cfg['table_arr'][$arr['mid']]; // 分类模型表名 // 如果为频道,获取频道分类下级CID if($arr['type'] == 1) { $arr['son_list'] = $this->get_cids_by_upid($cid, $arr['mid']); $arr['son_cids'] = array(); if(!empty($arr['son_list'])) { foreach($arr['son_list'] as $c => $v) { if(is_array($v)) { $v && $arr['son_cids'] = array_merge($arr['son_cids'], $v); }else{ $arr['son_cids'][] = $c; } } } } $this->runtime->set($k, $arr); return $arr; } //删除指定的分类缓存 public function delete_cache_one($cid = 0){ $k = 'cate_'.$cid; $this->runtime->delete($k); return true; } // 删除所有分类缓存 (最多读取2000条,如果缓存太大,需要手工清除缓存) public function delete_cache() { $key_arr = $this->runtime->find_fetch_key(array(), array(), 0, 2000); foreach ($key_arr as $v) { if(substr($v, 10, 5) == 'cate_') { $this->runtime->delete(substr($v, 10)); } } return TRUE; } //内容列表获取分类信息 public function getCategoryInfoByList(&$v, $cate = array()){ (empty($cate) && isset($v['cid'])) AND $cate = $this->get_cache($v['cid']); if(isset($cate['cid']) && isset($v['cid']) && $cate['cid'] == $v['cid']){ $v['cate_name'] = isset($cate['name']) ? $cate['name'] : ''; $v['cate_url'] = $this->category_url($cate); $v['cate_alias'] = isset($cate['alias']) ? $cate['alias'] : ''; $v['cate_intro'] = isset($cate['intro']) ? $cate['intro'] : ''; } } // 分类链接格式化 public function category_url(&$cate, $page = FALSE, $extra = array()) { $url = ''; $cid = isset($cate['cid']) ? (int)$cate['cid'] : 0; $alias = isset($cate['alias']) ? $cate['alias'] : ''; //使用相对URL if( (isset($this->cfg['url_path']) && !empty($this->cfg['url_path'])) || isset($extra['url_path']) && !empty($extra['url_path']) ){ unset($extra['url_path']);//要去掉这个参数,不然会到下面的附加参数里面 $this->cfg['weburl'] = $this->cfg['webdir']; } if(empty($cid) || empty($alias)){ return ''; } $lecms_parseurl = empty($_ENV['_config']['lecms_parseurl']) ? 0 : 1; if(empty($lecms_parseurl)) { $url .= $this->cfg['weburl'].'index.php?cate--cid-'.$cid.($page ? '-page-{page}' : ''); }else{ if($page) { $url .= $this->cfg['weburl'].$alias.$this->cfg['link_cate_page_pre'].'{page}'; }else{ $url .= $this->cfg['weburl'].$alias; } } // 附加参数 if($extra) { foreach ($extra as $k=>$v){ if(empty($lecms_parseurl)) { $url .= '-'.$k.'-'.$v; }else{ $url .= '/'.$k.'-'.$v; } } } //后缀 if(empty($lecms_parseurl)) { $url .= $_ENV['_config']['url_suffix']; }else{ if($page) { $url .= $this->cfg['link_cate_page_end']; }else{ $url .= $this->cfg['link_cate_end']; } } return $url; } } Lecms 3.0.3 错误

    错误信息

    • 消息: [程序异常] : Class 'category' not found
    • 文件: /www/wwwroot/www.wanmingwang.com/lecms/xiunophp/lib/core.class.php
    • 位置: 第449行

    错误位置

      #445            }
      #446        }
      #447
      #448        include $objfile;
      #449        $mod = new $model();
      #450        $_ENV['_models'][$modelname] = $mod;
      #451
      #452        return $mod;
      #453    }
      #454

    基本信息

    • 模型: /www/wwwroot/www.wanmingwang.com/lecms/model/
    • 视图: /www/wwwroot/www.wanmingwang.com/view/qm_pro/
    • 控制器: /www/wwwroot/www.wanmingwang.com/lecms/control/hl_control.class.php
    • 日志目录: /www/wwwroot/www.wanmingwang.com/runcache/logs/

    程序流程

    • #0 /www/wwwroot/www.wanmingwang.com/lecms/xiunophp/lib/control.class.php(10): core::model()
    • #1 /www/wwwroot/www.wanmingwang.com/runcache/lecms_view/qm_pro,hl_eventno.htm.php(143): control->__get()
    • #2 /www/wwwroot/www.wanmingwang.com/runcache/lecms_view/qm_pro,hl_eventno.htm.php(660): block_navigate()
    • #3 /www/wwwroot/www.wanmingwang.com/lecms/xiunophp/lib/view.class.php(25): include('/www/wwwroot/ww...')
    • #4 /www/wwwroot/www.wanmingwang.com/lecms/xiunophp/lib/control.class.php(23): view->display()
    • #5 /www/wwwroot/www.wanmingwang.com/runcache/lecms_control/hl_control.class.php(788): control->display()
    • #6 /www/wwwroot/www.wanmingwang.com/lecms/xiunophp/lib/core.class.php(341): hl_control->eventno()
    • #7 /www/wwwroot/www.wanmingwang.com/lecms/xiunophp/lib/core.class.php(11): core::init_control()
    • #8 /www/wwwroot/www.wanmingwang.com/lecms/xiunophp/xiunophp.php(100): core::init_start()
    • #9 /www/wwwroot/www.wanmingwang.com/index.php(107): require('/www/wwwroot/ww...')
    • #10 {main}

    SQL

    • #0 [time:0.0003s] SELECT * FROM le_runtime WHERE k='cfg' LIMIT 1
    • #1 [time:0.0040s] SELECT url_alias_prefix FROM le_ai_qiming_config LIMIT 1
    • #2 [time:0.0101s] SELECT mid FROM le_models
    • #3 [time:0.0038s] SELECT * FROM le_models WHERE mid='1' OR mid='2' OR mid='3' OR mid='4' OR mid='5'
    • #4 [time:0.0035s] SELECT * FROM le_runtime WHERE k='693aea0b1e1a8ca87c15cc17b077f245' LIMIT 1
    • #5 [time:0.0038s] SELECT * FROM le_runtime WHERE k='4e808335710b4872d77ba9e8ab9626c6' LIMIT 1
    • #6 [time:0.0037s] SELECT * FROM le_runtime WHERE k='1eb52b08622a6bf126e62160c96d7bec' LIMIT 1
    • #7 [time:0.0009s] SELECT * FROM le_kv WHERE k='navigate' LIMIT 1

    $_GET

    • #control => hl
    • #action => eventno
    • #nian => 1986
    • #yue => 4
    • #ri => 24
    • #eventpy => xietu

    $_POST

      $_COOKIE

        包含文件

        • #0 /www/wwwroot/www.wanmingwang.com/index.php
        • #1 /www/wwwroot/www.wanmingwang.com/lecms/xiunophp/xiunophp.php
        • #2 /www/wwwroot/www.wanmingwang.com/lecms/config/config.inc.php
        • #3 /www/wwwroot/www.wanmingwang.com/lecms/xiunophp/lib/base.func.php
        • #4 /www/wwwroot/www.wanmingwang.com/lecms/xiunophp/lib/core.class.php
        • #5 /www/wwwroot/www.wanmingwang.com/lecms/xiunophp/lib/debug.class.php
        • #6 /www/wwwroot/www.wanmingwang.com/lecms/xiunophp/lib/log.class.php
        • #7 /www/wwwroot/www.wanmingwang.com/lecms/xiunophp/lib/model.class.php
        • #8 /www/wwwroot/www.wanmingwang.com/lecms/xiunophp/lib/view.class.php
        • #9 /www/wwwroot/www.wanmingwang.com/lecms/xiunophp/lib/control.class.php
        • #10 /www/wwwroot/www.wanmingwang.com/lecms/xiunophp/db/db.interface.php
        • #11 /www/wwwroot/www.wanmingwang.com/lecms/xiunophp/db/db_pdo_mysql.class.php
        • #12 /www/wwwroot/www.wanmingwang.com/lecms/xiunophp/cache/cache.interface.php
        • #13 /www/wwwroot/www.wanmingwang.com/lecms/xiunophp/cache/cache_memcache.class.php
        • #14 /www/wwwroot/www.wanmingwang.com/lecms/xiunophp/ext/network/Network__interface.php
        • #15 /www/wwwroot/www.wanmingwang.com/lecms/config/plugin.inc.php
        • #16 /www/wwwroot/www.wanmingwang.com/lecms/plugin/editor_um/conf.php
        • #17 /www/wwwroot/www.wanmingwang.com/lecms/plugin/le_ai_qiming/conf.php
        • #18 /www/wwwroot/www.wanmingwang.com/lecms/plugin/le_category_filter/conf.php
        • #19 /www/wwwroot/www.wanmingwang.com/lecms/plugin/le_douhao_ai_article/conf.php
        • #20 /www/wwwroot/www.wanmingwang.com/lecms/plugin/le_hl/conf.php
        • #21 /www/wwwroot/www.wanmingwang.com/lecms/plugin/le_links/conf.php
        • #22 /www/wwwroot/www.wanmingwang.com/lecms/plugin/le_quming_pro/conf.php
        • #23 /www/wwwroot/www.wanmingwang.com/lecms/plugin/le_quming_pro_backup/conf.php
        • #24 /www/wwwroot/www.wanmingwang.com/lecms/plugin/le_title_pic/conf.php
        • #25 /www/wwwroot/www.wanmingwang.com/lecms/plugin/models_filed/conf.php
        • #26 /www/wwwroot/www.wanmingwang.com/runcache/misc.func.php
        • #27 /www/wwwroot/www.wanmingwang.com/runcache/core_lang/zh-cn.php
        • #28 /www/wwwroot/www.wanmingwang.com/runcache/lang/zh-cn.php
        • #29 /www/wwwroot/www.wanmingwang.com/runcache/lecms_control/parseurl_control.class.php
        • #30 /www/wwwroot/www.wanmingwang.com/runcache/lecms_model/runtime_model.class.php
        • #31 /www/wwwroot/www.wanmingwang.com/runcache/lecms_control/hl_control.class.php
        • #32 /www/wwwroot/www.wanmingwang.com/runcache/lecms_control/base_control.class.php
        • #33 /www/wwwroot/www.wanmingwang.com/runcache/lecms_model/urls_model.class.php
        • #34 /www/wwwroot/www.wanmingwang.com/runcache/lecms_model/models_model.class.php
        • #35 /www/wwwroot/www.wanmingwang.com/runcache/lecms_model/hl_model.class.php
        • #36 /www/wwwroot/www.wanmingwang.com/lecms/plugin/le_hl/lib/vendor/autoload.php
        • #37 /www/wwwroot/www.wanmingwang.com/lecms/plugin/le_hl/lib/vendor/composer/autoload_real.php
        • #38 /www/wwwroot/www.wanmingwang.com/lecms/plugin/le_hl/lib/vendor/composer/ClassLoader.php
        • #39 /www/wwwroot/www.wanmingwang.com/lecms/plugin/le_hl/lib/vendor/composer/autoload_static.php
        • #40 /www/wwwroot/www.wanmingwang.com/lecms/plugin/le_hl/lib/src/Solar.php
        • #41 /www/wwwroot/www.wanmingwang.com/lecms/plugin/le_hl/lib/src/Lunar.php
        • #42 /www/wwwroot/www.wanmingwang.com/lecms/plugin/le_hl/lib/src/LunarYear.php
        • #43 /www/wwwroot/www.wanmingwang.com/lecms/plugin/le_hl/lib/src/util/ShouXingUtil.php
        • #44 /www/wwwroot/www.wanmingwang.com/lecms/plugin/le_hl/lib/src/LunarMonth.php
        • #45 /www/wwwroot/www.wanmingwang.com/lecms/plugin/le_hl/lib/src/util/LunarUtil.php
        • #46 /www/wwwroot/www.wanmingwang.com/lecms/plugin/le_hl/lib/src/util/SolarUtil.php
        • #47 /www/wwwroot/www.wanmingwang.com/lecms/plugin/le_hl/lib/src/SolarMonth.php
        • #48 /www/wwwroot/www.wanmingwang.com/runcache/lecms_view/qm_pro,hl_eventno.htm.php
        • #49 /www/wwwroot/www.wanmingwang.com/runcache/lecms_model/kv_model.class.php
        • #50 /www/wwwroot/www.wanmingwang.com/runcache/lecms_model/category_model.class.php
        • #51 /www/wwwroot/www.wanmingwang.com/lecms/xiunophp/tpl/exception.php

        其他信息

        • 请求路径: /huangli/1986-4-24-xietu.html
        • 当前时间: 2026-03-30 09:20:14
        • 当前网协: 216.73.216.170
        • 运行时间: 0.6756
        • 内存开销: 3.4 MB
          Lecms 3.0.3