I am using the built in function file_exist
its not working, here is my code..
$filename = $myPath.$myFile.".jpg";
if($file_exists($filename))
{
$src = $filename;
} else {
$src = $defPath;
}
...
echo "<td><img src=' " . $src . " ' ... ></td>";
...
the file path is correct because when I drop the variable filename into the image src it pulls the images but when i use the above code all the images use the defPath as stated in my else statement.
the variable defPath is just a path to a default image in case the image doesn't exist.
I am using this in a loop but for sake brevity I just posted the above code.
thanks for you time.