使用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
相關文章
相關標籤/搜索