ID: 22096 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Feedback Bug Type: *General Issues Operating System: RedHat Linux PHP Version: 4.2.2 New Comment:
Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at http://bugs.php.net/how-to-report.php If you can provide more information, feel free to add it to this bug and change the status back to "Open". Thank you for your interest in PHP. Previous Comments: ------------------------------------------------------------------------ [2003-02-06 15:09:30] [EMAIL PROTECTED] Here's the code I'm working with: function getFilePath($filename,$path=''){ if(empty($path)){ $path=$this->basedir; } echo $path."<br>"; if($dir=@opendir($path)){ while(false!==($file=readdir($dir))){ if(!in_array($file,$this->remove_array)){ $file_path=$path."/".$file; if(is_file($file_path)){ if(strtolower($file)==strtolower($filename)){ $this->found_path=$file_path; return $file_path; } }elseif(is_dir($file_path)){ $this->getFilePath($filename,$file_path); } } } } closedir($dir); //return $this->found_path; } Where it starts in one dir, and goes until it finds a file - then, when it does, it's supposed to return that path value - but it doesn't. It keeps going through the rest of the directories without stopping at the "return" ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=22096&edit=1
