Ordner auslesen
Einfache Funktion um einen Ordner auszulesen
|
Script: |
<?php
function get_dirlist ($path = '')
{
if (empty($path)) $path = "./";
$dirlist = array();
$d = dir($path);
while($entry=$d->read())
{
if ($entry == '.' OR $entry == '..') continue;
if ($entry == 'images') continue;
if (is_dir($entry)) $dirlist[] = $entry;
}
$d->close();
sort($dirlist);
@reset($dirlist);
return $dirlist;
}
?>
|
|