note 90453 added to function.scandir
| From: | RuwanEpage:ruvan at msn dot com | Date: | Thu, 23 Apr 2009 08:51:03 +0000 |
| Subject: | note 90453 added to function.scandir | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-153605@lists.php.net to get a copy of this message | ||
how I remove all files in all subdirs one level:
$topDir = "xmlcache/browse/";
foreach(scandir($topDir) as $subDir)
foreach(glob("$topDir$subDir/*.*") as $file) unlink($file);
----
Server IP: 69.147.83.197
Probable Submitter: 71.191.153.232
----
Manual Page -- http://www.php.net/manual/en/function.scandir.php
Edit -- https://master.php.net/note/edit/90453
Del: integrated -- https://master.php.net/note/delete/90453/integrated
Del: useless -- https://master.php.net/note/delete/90453/useless
Del: bad code -- https://master.php.net/note/delete/90453/bad+code
Del: spam -- https://master.php.net/note/delete/90453/spam
Del: non-english -- https://master.php.net/note/delete/90453/non-english
Del: in docs -- https://master.php.net/note/delete/90453/in+docs
Del: other reasons-- https://master.php.net/note/delete/90453
Reject -- https://master.php.net/note/reject/90453
Search -- https://master.php.net/manage/user-notes.php