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"; } Quote 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) Quote 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 Quote Link to comment https://forums.phpfreaks.com/topic/61403-solved-is_file-problems/#findComment-305586 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.