title: PHP check file exists without knowing the extension
body: <p>I need to check if a file exists but I don't know the extension.</p>
  
  <p>IE I would like to do:</p>
  
  <pre><code>if(file_exists('./uploads/filename')):
   // do something
  endif;
  </code></pre>
  
  <p>Of course that wont work as it has no extension.  the extension will be either  jpg, jpeg, png, gif</p>
  
  <p>Any ideas of a way of doing this without doing a loop ?</p>