PHPCMS V9{loop subcat(0,0,0,$siteid) $r}怎么解释?

it2025-07-11  8

{loop subcat(0,0,0,$siteid) $r}{/loop}

/**

* 获取子栏目   * @param $parentid 父级id    * @param $type 栏目类型   * @param $self 是否包括本身 0为不包括   * @param $siteid 网站id   */   function subcat($parentid = NULL, $type = NULL,$self = '0', $siteid = '') {           if (empty($siteid)) $siteid = get_siteid();           $category = getcache('category_content_'.$siteid,'commons');           foreach($category as $id=>$cat) {                   if($cat['siteid'] == $siteid && ($parentid === NULL || $cat['parentid'] == $parentid) && ($type === NULL || $cat['type'] == $type)) $subcat[$id] = $cat;                   if($self == 1 && $cat['catid'] == $parentid && !$cat['child'])  $subcat[$id] = $cat;           }           return $subcat;   }  

转载于:https://www.cnblogs.com/bhlsheji/p/5079536.html

相关资源:数据结构—成绩单生成器
最新回复(0)