nowphp
<?php
function getFileList($dir){
    $dir=iconv("utf-8","gb2312",$dir);
    if ($headle=opendir($dir)){
        while ($file=readdir($headle)){
            $file=iconv("gb2312","utf-8",$file); 
            if ($file!=\'.\' && $file!=\'..\' ){
				$file = $dir."/".$file;
				if(is_file($file)){
					echo $file."\n";
				}else{
					getFileList($file);
				}
            }
        }
        closedir($headle);
    }
}
getFileList("C:/wnmp/www");
?>

 

glob() 函数返回匹配指定模式的文件名或目录。

 

posted on 2017-04-03 07:53  不断成长  阅读(163)  评论(0编辑  收藏  举报

分类:

技术点:

相关文章:

  • 2021-09-11
  • 2021-12-15
  • 2021-09-11
  • 2021-09-11
  • 2021-09-11
  • 2021-12-31
  • 2022-01-07
  • 2021-09-11
猜你喜欢
  • 2021-09-11
  • 2021-09-11
  • 2021-09-11
  • 2021-12-03
  • 2021-10-10
  • 2021-09-11
  • 2021-12-19
相关资源
相似解决方案