企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持知识库和私有化部署方案 广告
/** doc/admin_users [ #title @desc 超级管理员帐号设置 ], [ #title doc/admin_users/index ] */ $fs = file::find(BASE.'/modules/doc')['file']; foreach($fs as $f){ $fname = file::name($f); if($fname == 'login.php'){ continue; } $s1 = "doc/".substr($fname,0,strrpos($fname,'.')); $line = file_get_contents($f); preg_match('/desc(.*)\n/', $line, $matche); preg_match_all('/desc(.*)\n+(.*\n?){0,5}public(.*)function(.*)\(/', $line, $matches); if($matches){ $title = $matches[1]; $action = $matches[4]; $new[$s1]['top']['title'] = str_replace("\r","" ,strip_tags($matche[1])); foreach($title as $k=>$ti){ unset($out); $out['title'] = str_replace("\r","" ,strip_tags($ti)); $out['action'] = $s1."/".trim($action[$k]); $new[$s1][] = $out; } } } print_r($new);