PHP: Afficher le contenu d’un répertoire

Author:


Download

<html>
<head>
<title>Listing de contenu d'un Répertoire</title>
</head>
<body>

<?php
// Le répertoire courant
$nom_repertoire = ".";
$dI = opendir( $nom_repertoire );
while ( ! is_bool( $fichier = readdir( $dI )) )
{

  print "$fichier<br/>";
}
closedir( $dI );

?>
</body>
</html>

Leave a Reply

Your email address will not be published. Required fields are marked *


eight × 1 =