//获取文件目录列表,该方法返回数组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;}
