企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持知识库和私有化部署方案 广告
~~~ //获取文件目录列表,该方法返回数组 function getDir($dir) { $dirArray[]=NULL; if (false != ($handle = opendir ( $dir ))) { $i=0; while ( false !== ($file = readdir ( $handle )) ) { //去掉"“.”、“..”以及带“.xxx”后缀的文件 if ($file != "." && $file != ".."&&!strpos($file,".")) { $dirArray[$i]=$file; $i++; } } //关闭句柄 closedir ( $handle ); } return $dirArray; } ~~~