Page 1 of 1

archives

Posted: Fri Sep 09, 2005 7:27 am
by techker
hello again..im making an archives section.i need to know if there is a scripts that could show the files in one folder?

lets say you go on archives.php on that page you see the content in an archive folder.

Posted: Fri Sep 09, 2005 8:35 am
by feyd
you could easily make your own: glob()

Posted: Fri Sep 09, 2005 9:39 am
by Joe

Code: Select all

<?php
$dir = ""; //Dir name

if ($filehandle = opendir($dir)) {
  while (false !== ($filename = readdir($filehandle))) {
     if ($filename != "." && $filename != "..") {
        echo "$filename \n";
     }
   }
 closedir($filehandle);
}
?>

Posted: Fri Sep 09, 2005 6:51 pm
by techker
nice i will try it out.