• 首页
  • 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 Lecms 3.0.3 错误

    错误信息

    • 消息: [程序异常] : 类 category 不存在
    • 文件: /www/wwwroot/www.dkuki.cn/lecms/xiunophp/lib/core.class.php
    • 位置: 第115行

    错误位置

      #111        }elseif(is_file(FRAMEWORK_PATH.'ext/network/'.$classname.'.php')) {
      #112            include FRAMEWORK_PATH.'ext/network/'.$classname.'.php';
      #113        }else{
      #114            if(!defined('VENDOR')){
      #115                throw new Exception("类 $classname 不存在");
      #116            }
      #117        }
      #118        DEBUG && $_ENV['_include'][] = $classname.' 类';
      #119        return class_exists($classname, false);
      #120    }

    基本信息

    • 模型: /www/wwwroot/www.dkuki.cn/lecms/model/
    • 视图: /www/wwwroot/www.dkuki.cn/view/default/
    • 控制器: /www/wwwroot/www.dkuki.cn/lecms/control/tag_control.class.php
    • 日志目录: /www/wwwroot/www.dkuki.cn/runcache/logs/

    程序流程

    • #0 [internal function]: core::autoload_handler()
    • #1 /www/wwwroot/www.dkuki.cn/lecms/xiunophp/lib/core.class.php(439): spl_autoload_call()
    • #2 /www/wwwroot/www.dkuki.cn/lecms/xiunophp/lib/control.class.php(10): core::model()
    • #3 /www/wwwroot/www.dkuki.cn/runcache/lecms_view/default,tag_list.htm.php(64): control->__get()
    • #4 /www/wwwroot/www.dkuki.cn/runcache/lecms_view/default,tag_list.htm.php(559): block_list_flag()
    • #5 /www/wwwroot/www.dkuki.cn/lecms/xiunophp/lib/view.class.php(25): include('/www/wwwroot/ww...')
    • #6 /www/wwwroot/www.dkuki.cn/lecms/xiunophp/lib/control.class.php(23): view->display()
    • #7 /www/wwwroot/www.dkuki.cn/runcache/lecms_control/tag_control.class.php(126): control->display()
    • #8 /www/wwwroot/www.dkuki.cn/lecms/xiunophp/lib/core.class.php(341): tag_control->index()
    • #9 /www/wwwroot/www.dkuki.cn/lecms/xiunophp/lib/core.class.php(11): core::init_control()
    • #10 /www/wwwroot/www.dkuki.cn/lecms/xiunophp/xiunophp.php(100): core::init_start()
    • #11 /www/wwwroot/www.dkuki.cn/index.php(20): require('/www/wwwroot/ww...')
    • #12 {main}

    SQL

    • #0 [time:0.0001s] SET character_set_connection=utf8mb4, character_set_results=utf8mb4, character_set_client=binary, sql_mode=''
    • #1 [time:0.0002s] SELECT * FROM le_runtime WHERE k='cfg' LIMIT 1 [explain type: const | rows: 1]
    • #2 [time:0.0003s] SELECT * FROM le_cms_article_tag WHERE tagid='65589' LIMIT 1 [explain type: const | rows: 1]
    • #3 [time:0.0003s] SELECT tagid,id FROM le_cms_article_tag_data WHERE tagid='65589' ORDER BY id DESC LIMIT 0,10 [explain type: ref | rows: 1]
    • #4 [time:0.0002s] SELECT * FROM le_cms_article_tag_data WHERE tagid='65589' AND id='165570' OR tagid='65589' AND id='97772' [explain type: range | rows: 2]
    • #5 [time:0.0002s] SELECT * FROM le_cms_article_views WHERE id='165570' OR id='97772' [explain type: range | rows: 2]
    • #6 [time:0.0002s] SELECT * FROM le_cms_article WHERE id='165570' OR id='97772' [explain type: range | rows: 2]
    • #7 [time:0.0002s] SELECT * FROM le_kv WHERE k='le_rand_pic' LIMIT 1 [explain type: const | rows: 1]
    • #8 [time:0.0002s] SELECT * FROM le_user WHERE uid='1' LIMIT 1 [explain type: system | rows: 1]

    $_GET

    • #control => tag
    • #action => index
    • #mid => 2
    • #tagid => 65589

    $_POST

      $_COOKIE

        包含文件

        • #0 /www/wwwroot/www.dkuki.cn/index.php
        • #1 /www/wwwroot/www.dkuki.cn/lecms/xiunophp/xiunophp.php
        • #2 /www/wwwroot/www.dkuki.cn/lecms/config/config.inc.php
        • #3 /www/wwwroot/www.dkuki.cn/lecms/xiunophp/lib/base.func.php
        • #4 /www/wwwroot/www.dkuki.cn/lecms/xiunophp/lib/core.class.php
        • #5 /www/wwwroot/www.dkuki.cn/lecms/xiunophp/lib/debug.class.php
        • #6 /www/wwwroot/www.dkuki.cn/lecms/xiunophp/lib/log.class.php
        • #7 /www/wwwroot/www.dkuki.cn/lecms/xiunophp/lib/model.class.php
        • #8 /www/wwwroot/www.dkuki.cn/lecms/xiunophp/lib/view.class.php
        • #9 /www/wwwroot/www.dkuki.cn/lecms/xiunophp/lib/control.class.php
        • #10 /www/wwwroot/www.dkuki.cn/lecms/xiunophp/db/db.interface.php
        • #11 /www/wwwroot/www.dkuki.cn/lecms/xiunophp/db/db_mysqli.class.php
        • #12 /www/wwwroot/www.dkuki.cn/lecms/xiunophp/cache/cache.interface.php
        • #13 /www/wwwroot/www.dkuki.cn/lecms/xiunophp/cache/cache_memcache.class.php
        • #14 /www/wwwroot/www.dkuki.cn/lecms/xiunophp/ext/network/Network__interface.php
        • #15 /www/wwwroot/www.dkuki.cn/lecms/config/plugin.inc.php
        • #16 /www/wwwroot/www.dkuki.cn/lecms/plugin/editor_um/conf.php
        • #17 /www/wwwroot/www.dkuki.cn/lecms/plugin/le_drafts/conf.php
        • #18 /www/wwwroot/www.dkuki.cn/lecms/plugin/le_import_txt/conf.php
        • #19 /www/wwwroot/www.dkuki.cn/lecms/plugin/le_links/conf.php
        • #20 /www/wwwroot/www.dkuki.cn/lecms/plugin/le_rand_pic/conf.php
        • #21 /www/wwwroot/www.dkuki.cn/lecms/plugin/le_sitemaps_pro_v303/conf.php
        • #22 /www/wwwroot/www.dkuki.cn/lecms/plugin/le_title_pic/conf.php
        • #23 /www/wwwroot/www.dkuki.cn/lecms/plugin/le_website_group/conf.php
        • #24 /www/wwwroot/www.dkuki.cn/lecms/plugin/le_zhanqunsitemaps_pro_v303/conf.php
        • #25 /www/wwwroot/www.dkuki.cn/lecms/plugin/models_filed/conf.php
        • #26 /www/wwwroot/www.dkuki.cn/runcache/misc.func.php
        • #27 /www/wwwroot/www.dkuki.cn/runcache/core_lang/zh-cn.php
        • #28 /www/wwwroot/www.dkuki.cn/runcache/lang/zh-cn.php
        • #29 /www/wwwroot/www.dkuki.cn/runcache/lecms_control/parseurl_control.class.php
        • #30 /www/wwwroot/www.dkuki.cn/runcache/lecms_model/runtime_model.class.php
        • #31 /www/wwwroot/www.dkuki.cn/runcache/lecms_control/tag_control.class.php
        • #32 /www/wwwroot/www.dkuki.cn/runcache/lecms_control/base_control.class.php
        • #33 /www/wwwroot/www.dkuki.cn/runcache/lecms_model/urls_model.class.php
        • #34 /www/wwwroot/www.dkuki.cn/runcache/lecms_model/cms_content_tag_model.class.php
        • #35 /www/wwwroot/www.dkuki.cn/runcache/lecms_model/cms_content_model.class.php
        • #36 /www/wwwroot/www.dkuki.cn/runcache/lecms_view/default,tag_list.htm.php
        • #37 /www/wwwroot/www.dkuki.cn/lecms/xiunophp/ext/paginator.class.php
        • #38 /www/wwwroot/www.dkuki.cn/runcache/lecms_model/cms_content_tag_data_model.class.php
        • #39 /www/wwwroot/www.dkuki.cn/runcache/lecms_model/cms_content_views_model.class.php
        • #40 /www/wwwroot/www.dkuki.cn/runcache/lecms_model/kv_model.class.php
        • #41 /www/wwwroot/www.dkuki.cn/runcache/lecms_model/user_model.class.php
        • #42 /www/wwwroot/www.dkuki.cn/runcache/lecms_model/category_model.class.php
        • #43 /www/wwwroot/www.dkuki.cn/lecms/xiunophp/tpl/exception.php

        其他信息

        • 请求路径: /tag/65589.html
        • 当前时间: 2026-06-03 03:11:18
        • 当前网协: 216.73.216.189
        • 运行时间: 0.5716
        • 内存开销: 1.53 MB
          Lecms 3.0.3