//删除文件夹下所有文件 public function delFiles($dir = './Public/Cache/') { $dh = opendir($dir); while ($file = readdir($dh)) { if ($file != "." && $file != "..") { $fullpath = $dir . "/" . $file; if (!is_dir($fullpath)) { unlink($fullpath); } else { delFiles($fullpath); } } } closedir($dh); } //调用 public function del() { $this->delFiles('./111111/'); }
删除文件夹下所有文件
发表于
发表回复