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? Link to comment https://forums.phpfreaks.com/topic/132979-solved-checking-to-see-if-an-actual-image-file-exists-in-a-certain-directory/ Share on other sites More sharing options...
Mchl Posted November 16, 2008 Share Posted November 16, 2008 file_exists Link to comment https://forums.phpfreaks.com/topic/132979-solved-checking-to-see-if-an-actual-image-file-exists-in-a-certain-directory/#findComment-691530 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 Link to comment https://forums.phpfreaks.com/topic/132979-solved-checking-to-see-if-an-actual-image-file-exists-in-a-certain-directory/#findComment-691534 Share on other sites More sharing options...
gsaldutti Posted November 16, 2008 Author Share Posted November 16, 2008 Awesome, thanks guys!! Link to comment https://forums.phpfreaks.com/topic/132979-solved-checking-to-see-if-an-actual-image-file-exists-in-a-certain-directory/#findComment-691536 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.