Einzelnen Beitrag anzeigen

Balu der Bär
(Gast)

n/a Beiträge
 
#3

Re: [PHP] Ordner & Dateien auflisten

  Alt 19. Mai 2006, 12:15
Luckie´s Thread habe ich nicht gefunden, dafür aber deinen. Aber so wie du es gelöst hat gehts bei mir auch nicht:
Code:
<?php
function ListDirs($dir)
{
  $dirs = Array();
  $handle = opendir($dir);
  $count = 0;

  while ($s = readdir($handle))
  {
    if ( (!(is_file($s))) AND (($s[0] != '.')) AND (is_dir($dir.$s)) )
    {
      $dirs[$count] = $s;
      $count++;
    }
  }

  closedir($handle);
  array_multisort($dirs, SORT_ASC, $dirs);
  return $dirs;
}
 echo ListDirs('http://localhost/');
?>
Zitat:
Warning: opendir(http://localhost/) [function.opendir]: failed to open dir: not implemented in S:\tux\xampp\htdocs\xampp\php\test1.php on line 5

Warning: readdir(): supplied argument is not a valid Directory resource in S:\tux\xampp\htdocs\xampp\php\test1.php on line 8

Warning: closedir(): supplied argument is not a valid Directory resource in S:\tux\xampp\htdocs\xampp\php\test1.php on line 17
  Mit Zitat antworten Zitat