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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations)
Tue Apr 29 11:55:32 2025 UTC (10 months, 2 weeks ago) by sysadm
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +0 -1 lines
Remove redundant PHP closing tag

1 <?php
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 }

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