note 52839 deleted from function.scandir by felipe
| From: | felipe@php.net | Date: | Fri, 29 Aug 2008 23:23:09 +0000 |
| Subject: | note 52839 deleted from function.scandir by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-143993@lists.php.net to get a copy of this message | ||
Note Submitter: pablo dot fabregat at gmail dot com
----
i was triyng to do something similar to the ls -R command in linux, so, using the functions from
csaba , i could, so, using this simple lines, you'll get that result:
<?php
$directory = "."; // for the actual directory
$directories = dirList($directory, 2, 0); // this calls the csaba's function dirlist, wich has
type 2(files) and level 0($path and all subdirectories) as parameters. And it will return an array
with all the returned paths
//so i cross all over the array doing an echo for every single item of the array
foreach ($directories as $dir){
echo $dir."<br>";
}
?>
and that's it, remember that you need the functions listed above from csaba to use this