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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations)
Fri Mar 28 05:55:52 2025 UTC (11 months, 2 weeks ago) by sysadm
Branch: MAIN
Add deltree()

1 sysadm 1.1 <?
2     function delTree($dir)
3     {
4     $files = array_diff(scandir($dir), array('.', '..'));
5    
6     foreach ($files as $file)
7     {
8     if (is_dir("$dir/$file"))
9     {
10     delTree("$dir/$file");
11     }
12     else
13     {
14     unlink("$dir/$file");
15     }
16     }
17    
18     return rmdir($dir);
19     }
20     ?>

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