2018-02-27:使用 PHP 實現目錄檔案讀取

weixin_33807284發表於2018-02-27
<?php

    
    $path = "D:\\Documents\\QQEIM Files\\3004397988\\python3rd";
    
    $resource = opendir($path);
    
    while ($row = readdir($resource)) {
        
        var_dump($row);
    }
    closedir($resource);
    
    
    echo "<hr/>";
    
    $list = scandir($path);
    
    var_dump($list);
    
    echo "<hr/>";
    
    
    $list = glob("*.php");
    var_dump($list);
    
    
    

相關文章