Mar
05
Posted on 05-03-2008
Filed Under (Programming Hints) by Steven on 05-03-2008


  1. I am just posting this code because I think I am going to need it later, and I don’t want to lose it. 
  2. <? php 
  3. if ($handle opendir(‘/path/to/files’)) { 
  4. echo “Directory handle: $handle\n”;     
  5. echo “Files:\n”;     // List all the files     
  6. while (false !== ($file readdir($handle))) {         
  7. echo “$file\n”;     }     closedir($handle); } 
  8. ?> 
(0) Comments    Read More