gsaldutti Posted November 16, 2008 Share Posted November 16, 2008 I just want to put some code on my page that checks to see if an actual file is in my images folder on my server. Let's say the file is called "monkeys.jpg" and is found in the path "...images/monkeys.jpg" I just want to be able to say "If the file "monkeys.jpg" exists, then..." How do I check that with PHP syntax? Quote Link to comment Share on other sites More sharing options...
Mchl Posted November 16, 2008 Share Posted November 16, 2008 file_exists Quote Link to comment Share on other sites More sharing options...
graham23s Posted November 16, 2008 Share Posted November 16, 2008 yep if (file_exists("images/monkeys.jpg")) { print "file is there "; } else { print "file is not there "; } Graham Quote Link to comment Share on other sites More sharing options...
gsaldutti Posted November 16, 2008 Author Share Posted November 16, 2008 Awesome, thanks guys!! 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.