Darkmatter5 Posted August 20, 2009 Share Posted August 20, 2009 Here's my code: The variables "$imagesml, $imagelrg and $imagesys are all created above this code. if(file_exists("$imagesml")) { $imagesmla="The file $imagesml exists"; } else { $imagesmla="The file $imagesml does not exist"; } if(file_exists("$imagelrg")) { $imagelrga="The file $imagelrg exists"; } else { $imagelrga="The file $imagelrg does not exist"; } if(file_exists("$imagesys")) { $imagesysa="The file $imagesys exists"; } else { $imagesysa="The file $imagesys does not exist"; } <table> <tr><td>imagesml: <?php echo $imagesml; ?><br>imagelrg: <?php echo $imagelrg; ?><br>imagesys: <?php echo $imagesys; ?></td></tr> <tr><td>imagesmla: <?php echo $imagesmla; ?><br>imagelrga: <?php echo $imagelrga; ?><br>imagesysa: <?php echo $imagesysa; ?></td></tr> </table> Here's the output from that code: imagesml: http://www.thealienhive.com/facebook/ent-trader/images/logos/i101-small.png imagelrg: http://www.thealienhive.com/facebook/ent-trader/images/logos/i101-full.png imagesys: http://www.thealienhive.com/facebook/ent-trader/images/logos/icon-256 360.png imagesmla: The file http://www.thealienhive.com/facebook/ent-trader/images/logos/i101-small.png does not exist imagelrga: The file http://www.thealienhive.com/facebook/ent-trader/images/logos/i101-full.png does not exist imagesysa: The file http://www.thealienhive.com/facebook/ent-trader/images/logos/icon-256 360.png does not exist If you copy and paste the links you'll see they do in fact exist. This is a Facebook application, but the PHP code is all resides on the same location as the image files being checked for. What might I be doing wrong? Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted August 20, 2009 Share Posted August 20, 2009 file_exists only works with a few URL wrappers and HTTP is not one of them. Quote Link to comment 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.