Powered by Ajaxy
Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset
Comments Off on PHP: lister le contenu d’un Répertoire

PHP: lister le contenu d’un Répertoire

 
<?php
$dirname = ".";
$dh = opendir($dirname) or die("Impossible 'ouviri ce dossier");
 
while (!(($file = readdir($dh)) === false ) ) {
  if (is_dir("$dirname/$file")) {
    echo "(D) ";
  }
  echo $file."<br/>";
}
closedir($dh);
?>
 
           
       

Comments are closed.