Reading Contents from a Directory : Directory : File Directory PHP Source Code


PHP Source Code » File Directory » Directory »

 

Reading Contents from a Directory




 <?php
  if (file_exists ("./")) {
    if (is_dir ("./")) {
      $dh = opendir ("./"or die (" Directory Open failed !");
      while ($file = readdir ($dh)) {
        echo "$filen";
      }
      echo "Directory was opened successfully";
      Closedir ($dh);
    }
  }
 ?>
           
       



HTML code for linking to this page:

Follow Navioo On Twitter

PHP Source Code

 Navioo File Directory
» Directory