renderJson(compact('code', 'err')); } public function actionTags() { //获取数据 $menus = array(); //菜单,一级目录 $htmlReadme = ''; //Readme.md 内容,底部网站详细介绍 $htmlCateReadme = ''; //当前目录下的Readme.md 内容 $menus_sorted = array(); //Readme_sort.txt 说明文件内容,一级目录菜单从上到下的排序 $scanner = new DirScanner(); $scanner->setWebRoot(FSC::$app['config']['content_directory']); $dirTree = $scanner->scan(__DIR__ . '/../../../www/' . FSC::$app['config']['content_directory'], 3); $code = 1; $msg = ''; $err = ''; //获取tags分类 $noFiles = true; $data = $this->getTags($dirTree, $noFiles); return $this->renderJson(compact('code', 'msg', 'err', 'data')); } }