Im trying to verify if file exists in directory. When I use this code it works - image is displayed:
<?php
$imgId=0;
$filename='../uploadedimages/project-'.$item->id.'-'.$imgId;
echo "<img src='".$filename."' ></img>";
?>
When I use the same code with file_exists function, it doesn't work:
<?php
$imgId=0;
$filename='../uploadedimages/project-'.$item->id.'-'.$imgId;
if (file_exists($filename)) {
echo "<img src='".$filename."' ></img>";
}
?>
My question is simple: WTF??