ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的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);