I have a function that checks if the mobile image exists and if does then it will return true. No matter what I do I can't get this function to work properly.
public function mobileImageExist($image)
{
$file = "images/$image";
if(file_exists($file))
return true;
return false;
}
I have also tried
public function mobileImageExist($image)
{
$file = dirname(__FILE__)."/images/$image";
if(file_exists($file))
return true;
return false;
}
the $image parameter that is being passed to the function is just the image name. ex: banner_mobile.jpg