paatrick

Alle Dateien rekursiv auflisten

Jan 27th, 2021
687
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.   $startdir = "./";
  2.  
  3.   $iterator = new RecursiveIteratorIterator(
  4.     new RecursiveDirectoryIterator($startdir)
  5.   );
  6.   foreach($iterator as $file) {
  7.     if(!$file->isFile()) {
  8.       continue;
  9.     }
  10.     echo $file->getPathname() . "\n";
  11.   }
RAW Paste Data