I'm using file_exists() in a class and I want to use it on the root as well as when included in another folder to see if a file exists.
I currently have:
if (file_exists("./photos/".$this->id.".jpg") ){
//
}
It works when included in the root but not when included in a folder (for ajax).
What can I do to make it direct (I think thats the correct word)? I am unable to put my site URL into it because of the nature of the function.