ThinkPHP中实现无限级分类的代码如下:,,``php,public function getTree($cid = 0, $level = 0) {, static $tree = array();, if (!isset($tree[$cid])) {, $model = M('Category');, ……