seany123 Posted September 5, 2011 Share Posted September 5, 2011 <?php $path = "www.DOMAINHERE.com/images/showlogos/".$showNAME."_logo.jpg"; if (file_exists($path)){ echo "YES"; ?> <a href="index.php"><img src="/images/showlogos/<?=$showNAME?>_logo.jpg" width="190" height="62" /></a><br /><br /> <?php } else { echo "NO!"; echo $path; } ?> the result is echoing out NO! which means the file doesnt exist... however when i c+p the echo'd $path into my address bar, it shows the image.. Thanks Link to comment https://forums.phpfreaks.com/topic/246478-why-does-this-work/ Share on other sites More sharing options...
KevinM1 Posted September 5, 2011 Share Posted September 5, 2011 file_exists takes a directory path, not a URL. Link to comment https://forums.phpfreaks.com/topic/246478-why-does-this-work/#findComment-1265667 Share on other sites More sharing options...
seany123 Posted September 5, 2011 Author Share Posted September 5, 2011 oh, thanks that worked! Link to comment https://forums.phpfreaks.com/topic/246478-why-does-this-work/#findComment-1265668 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.