Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

17 lines (16 sloc) 0.507 kb
<?php
/**
* This is a basic example of recursively iterating over a directory,
* skipping both "." and "..".
*/
$files = new RecursiveIteratorIterator(
new RecursiveDirectoryIterator(__DIR__ . DIRECTORY_SEPARATOR . 'directory-iterator-example')
);
// iterate over all files from the child directory "directory-iterator-example"
foreach ($files as $file) {
// skip over dots ("." and "..")
if (!$file->isDot()) {
// example of the
echo $file->getRealPath() . PHP_EOL;
}
}
Jump to Line
Something went wrong with that request. Please try again.