title: Lstat error for filetype(). Followed example from php.net
body: <p>I am trying to fetch directory data from a file.</p>
  
  <p><strong>Desired behaviour</strong> I want to the code to echo out the directory. I'll eventually put it all in an array.</p>
  
  <p><strong>Issue</strong> I am getting several Warning: filetype(): Lstat failed errors. All of this is tested on WAMP. </p>
  
  <p>here is my code:</p>
  
  <pre><code>    $dir = "../images/";
  
  
  echo $dir;
  
  if (is_dir($dir)){
     if ($dh = opendir($dir)){
          while ($file = readdir($dh) !== false){
              echo "filename: $file : filetype: ". filetype($dir . $file). "&lt;/br&gt;";
          }
      closedir($dr);
  
          }
  }
  </code></pre>
  
  <p>Any help would be greatly appreciated.</p>