note 106047 added to function.glob
| From: | mkas at destiny dot lt | Date: | Wed, 05 Oct 2011 19:58:38 +0000 |
| Subject: | note 106047 added to function.glob | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-183649@lists.php.net to get a copy of this message | ||
recursive file search
<?php
$path[] = 'starting_place/*';
while(count($path) != 0)
{
$v = array_shift($path);
foreach(glob($v) as $item)
{
if (is_dir($item))
$path[] = $item . '/*';
elseif (is_file($item))
{
//do something
}
}
}
?>
----
Server IP: 193.219.81.76
Probable Submitter: 78.60.70.32
----
Manual Page -- http://www.php.net/manual/en/function.glob.php
Edit -- https://master.php.net/note/edit/106047
Del: integrated -- https://master.php.net/note/delete/106047/integrated
Del: useless -- https://master.php.net/note/delete/106047/useless
Del: bad code -- https://master.php.net/note/delete/106047/bad+code
Del: spam -- https://master.php.net/note/delete/106047/spam
Del: non-english -- https://master.php.net/note/delete/106047/non-english
Del: in docs -- https://master.php.net/note/delete/106047/in+docs
Del: other reasons-- https://master.php.net/note/delete/106047
Reject -- https://master.php.net/note/reject/106047
Search -- https://master.php.net/manage/user-notes.php