/[LeafOK_CVS]/fenglin/lib/dir.inc.php
ViewVC logotype

Diff of /fenglin/lib/dir.inc.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.1 by sysadm, Fri Mar 28 05:55:52 2025 UTC Revision 1.4 by sysadm, Tue Apr 29 11:55:32 2025 UTC
# Line 1  Line 1 
1  <?  <?php
2          function delTree($dir)          function delTree($dir)
3          {          {
4                  $files = array_diff(scandir($dir), array('.', '..'));                  $files = array_diff(scandir($dir), array('.', '..'));
5            
6                  foreach ($files as $file)                  foreach ($files as $file)
7                  {                  {
8                          if (is_dir("$dir/$file"))                          if (is_dir("$dir/$file"))
# Line 14  Line 14 
14                                  unlink("$dir/$file");                                  unlink("$dir/$file");
15                          }                          }
16                  }                  }
17            
18                  return rmdir($dir);                  return rmdir($dir);
19          }          }
 ?>  


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1