Re: file_exists() not working correctly?
| From: | Carlos Medina | Date: | Mon, 25 Aug 2008 07:37:38 +0000 |
| Subject: | Re: file_exists() not working correctly? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-278631@lists.php.net to get a copy of this message | ||
Chris schrieb:
Chris Haensel wrote:please show at your JPG or jpg lower or Uppercase at first. Check if the file really exists and your server can read of the directory Regards CarlosGood morning list, I have a _very_ simple function... it is as follows /**********************************************/ function getgalimage($fzg) {Try a full path: $folder = '/full/path/to/bilder'; Hi,$folder = "bilder"; $imgname = $fzg."_1.JPG"; $checkimg = $folder."/".$imgname; if(file_exists($checkimg)) { //echo '<imgsrc="mod_search_thumbs.php?bild='.$imgname.'&fzg_nr='.$fzg.'">';echo '<img src="'.$checkimg.'">'; } else { echo '<div style="display:block; padding:2px; border:1pxsolid red;"><a href="'.$checkimg.'">'.$checkimg.'</a></div>';}} /**********************************************/ Now, the folder "bilder" exists, and I pass the number 0002822 to the function. Now it should check whether the image file "bilder/0002822_1.JPG" exists. It never finds the image, even though it exists (I checked it many times now)