Anonymous
public text v1 · immutable<?
function listing($path)
{
$path = realpath($path).'/';
$repertoire = opendir($path);
while ($contenu = readdir($repertoire)) {
if (is_file($path.$contenu)) {
echo $contenu."<br />";
}
if ((is_dir($path.$contenu)) && ($contenu != "..") && ($contenu !="." )) {
echo '<br />';
$new_dir = realpath($path.$contenu);
listing($new_dir);
}
}
}
$path = ".";
listing($path);
?>