class styleFinder{
function styleFinder(){
}
function getFilesNFolders($folder){
$this->folder = $folder ;
if($this->folder==""){
$this->folder = '.';
}
if ($handle = opendir($this->folder)) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {
echo "$file<br /> ";
if(is_dir($file)){
echo "<b>" . $file . " is a folder</b><br /> with contents ";
$this::getFilesNFolders($file);
# echo "Found folder";
}
}
}
closedir($handle);
}
}
} I wan to print out a complete tree of folders and files, the script is going into the first folders and finding the files, then finding any sub folders, but not subfolders of those (and yes there is some). Any ideas please?
$this::getFilesNFolders($file);
Should Be
$this->getFilesNFolders($file);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With