title: php direct path file_exists()
body: <p>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.</p>
  
  <p>I currently have:</p>
  
  <pre><code>if (file_exists("./photos/".$this-&gt;id.".jpg") ){ 
  
  //
  
  }
  </code></pre>
  
  <p>It works when included in the root but not when included in a folder (for ajax).</p>
  
  <p>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.</p>