//搜索文件夹下全部文件,暂时不支持中文文件名 public function scanFile($path) { global $result; $files = scandir($path); foreach ($files as $file) { if ($file != '.' && $file != '..') { if (is_dir($path . '/' . $file)) { scanFile($path . '/' . $file); } else { $result[] = basename($file); } } } return $result; }
宠物免费领养小程序,欢迎来踩