Home > Backend Development > PHP Tutorial > PHPCMS V9{loop subcat(0,0,0,$siteid) $r}如何解释

PHPCMS V9{loop subcat(0,0,0,$siteid) $r}如何解释

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 12:02:06
Original
1023 people have browsed it

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

{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; 
} 
Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template