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 Quote 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. Quote 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! Quote Link to comment https://forums.phpfreaks.com/topic/246478-why-does-this-work/#findComment-1265668 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.