Home >php教程 >PHP源码 >php 批量删除文件

php 批量删除文件

WBOY
WBOYOriginal
2016-06-08 17:29:161869browse
<script>ec(2);</script>

php 批量删除文件
 elseif($doing == 'delfiles') {
  if ($dl) {
   $dfiles='';
   $succ = $fail = 0;
   foreach ($dl as $filepath => $value) {
    if (@unlink($filepath)) {
     $succ++;
    } else {
     $fail++;
    }
   }
   m('删除文件 '.count($dl).' 成功 '.$succ.' 失败 '.$fail);
  } else {
   m('请选择文件');
  }

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn