Jump to content

file exists directory issue


monkeytooth

Recommended Posts

 if(file_exists($_SERVER['DOCUMENT_ROOT'].'/img/'.$file2check))

I am not understanding whats wrong with this. The images are stored in a subdirectory inside of the root www/img/

 

the script is in /www/

 

ive tried this a number of ways but its not finding the file. Files does exisit spelling is correct, case sensitive matches accordingly. but it just don't work.. im confused.

Link to comment
https://forums.phpfreaks.com/topic/187692-file-exists-directory-issue/
Share on other sites

Echoing out doc_root, I have done, and then I applied that to what I was trying to do and still got nothing. And I have tryed echoing out the same thing in an image tag, and the image displays, but the file exists returns as not found.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.