Dan911 Posted July 23, 2007 Share Posted July 23, 2007 I know this file exists, but how come the is_file command isnt working? I have to get this working with an absolute path. I also tried file_exists to no avail if (is_file($_SERVER['DOCUMENT_ROOT'] . "stuff/images/resizedimage.jpg")) { echo "file exists - " . $_SERVER['DOCUMENT_ROOT'] . "/stuff/images/resizedimage.jpg"; } else { echo "file not found - " . $_SERVER['DOCUMENT_ROOT'] . "/stuff/images/resizedimage.jpg"; } Link to comment https://forums.phpfreaks.com/topic/61403-solved-is_file-problems/ Share on other sites More sharing options...
per1os Posted July 23, 2007 Share Posted July 23, 2007 if (is_file($_SERVER['DOCUMENT_ROOT'] . "/stuff/images/resizedimage.jpg")) I think you need that extra slash in there, I am not sure (You have it in the echo statement) Link to comment https://forums.phpfreaks.com/topic/61403-solved-is_file-problems/#findComment-305582 Share on other sites More sharing options...
Dan911 Posted July 23, 2007 Author Share Posted July 23, 2007 your right, thanks a bunch, no idea why i didn't notice that Link to comment https://forums.phpfreaks.com/topic/61403-solved-is_file-problems/#findComment-305586 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.