PHP scandir() 函數

scandir() 函數返回指定目錄中的文件和目錄的數組。php //遍歷目錄 public function scandir($filepath){ if (is_dir($filepath)){ $arr=scandir($filepath); foreach ($arr as $k=>$v){ $this->fileinfo[$v][]=$this->getfilesize($v); } }
相關文章
相關標籤/搜索