note 39089 added to ref.dir
| From: | IanRedden at rn2 dot php dot net | Date: | Fri, 16 Jan 2004 19:18:19 +0000 |
| Subject: | note 39089 added to ref.dir | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-63691@lists.php.net to get a copy of this message | ||
Heres mine modified from the original example:
function listdir($dir) {
function ls_recursive($dir) {
if (is_dir($dir))
{
$dirhandle=opendir($dir);
while(($file = readdir($dirhandle)) !== false)
{
if (($file!=".")&&($file!="..")) {
$currentfile=$dir."/".$file;
if (!$i) $i = 0;
$dir_array[$i] = $currentfile;
$i++;
if(is_dir($currentfile)) {
ls_recursive($currentfile);
}
}
}
}
return $dir_array;
}
$dir_array = ls_recursive($dir);
return $dir_array;
}
----
Manual Page -- http://www.php.net/manual/en/ref.dir.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+39089
Delete -- http://master.php.net/manage/user-notes.php?action=delete+39089&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+39089&report=yes
Search -- http://master.php.net/manage/user-notes.php