problem calling a php method from within itself

ulrichsNe

New Member
\[code\]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 />&nbsp;&nbsp;&nbsp;with contents "; $this::getFilesNFolders($file); # echo "Found folder"; } } } closedir($handle); }}\[/code\]}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?
 
Back
Top