php遍歷一個文件夾下的全部文件和子文件

function fetchDir($dir) { 
        foreach(glob($dir.'\*') as $file) { 
            echo $file,"\n"; 
            if(is_dir($file)) { 
                fetchDir($file); 
            } 
        } 
    } 
    fetchDir("D:\wamp\www\any");
相關文章
相關標籤/搜索