title: read file name from directory
body: <p>I want to read html file name from directory without any database. I have a code and its working properly, but two blank name it is giving, while I have only 4 file in directory. </p>
  
  <pre><code>&lt;?php
   if (is_dir('dir')) {
  if ($dh = opendir('dir')) {
      while (($file = readdir($dh)) !== false) {
          echo "filename:".$file."&lt;br /&gt;";
      }
  }
  }?&gt;
  </code></pre>
  
  <p>I have 4 html file and output should be:</p>
  
  <pre><code>filename:aaaaaa kjnnk_13.html
  filename:aaaaaa kjnnk_2.html
  filename:aaaaaa kjnnk_6.html
  filename:aaaaaa kjnnk_9.html
  </code></pre>
  
  <p>But I found 2 extra filename:</p>
  
  <pre><code>filename:.
  filename:..
  filename:aaaaaa kjnnk_13.html
  filename:aaaaaa kjnnk_2.html
  filename:aaaaaa kjnnk_6.html
  filename:aaaaaa kjnnk_9.html
  </code></pre>
  
  <p>Please help</p>