路径:\install_package\phpcms\libs\functions\extention.func.php <?php //输入栏目ID获取父级栏目名称 function catposparentname($catid){ $category_arry = array(); $siteids = getcache('category_content','commons'); $siteid = $siteids[$catid]; $category_arr = getcache('category_content_'.$siteid,'commons'); $parentid = $category_arr[$catid]['parentid']; $parentName=$category_arr[$parentid]['catname']; return $parentName; } //输入栏目ID获取父级栏目描述 function catposparentdescription($catid){ $category_arry = array(); $siteids = getcache('category_content','commons'); $siteid = $siteids[$catid]; $category_arr = getcache('category_content_'.$siteid,'commons'); $parentid = $category_arr[$catid]['parentid']; $parentDescription=$category_arr[$parentid]['description']; return $parentDescription; } //输入栏目ID获取父级栏目ID function catposparentid($catid){ $category_arry = array(); $siteids = getcache('category_content','commons'); $siteid = $siteids[$catid]; $category_arr = getcache('category_content_'.$siteid,'commons'); $parentid = $category_arr[$catid]['parentid']; return $parentid; } ?>