使用php scandir()函数遍历文件夹并输出全部文件路径

以F盘为例: <?php $dir = "F:"; //当前目录 function list_file($dir){ $list = scandir($dir); // 获得该文件下的全部文件和文件夹 foreach($list as $file){//遍历 $file_location=$dir."/".$file;//生成路径 if(is_dir($file_l
相关文章
相关标签/搜索