file_exists problem
Posted: Wed Jun 07, 2006 2:19 pm
I'm trying to use the file_exists function to check that an image exists before displaying a link.
It's always returning false - even if the image exists.
Any suggestions?
Code: Select all
function image_exists($image_name) {
$dir = "http://domain.com/images/";
if(file_exists($dir.$image_name) {
return true;
}else{
return false;
}
}It's always returning false - even if the image exists.
Any suggestions?