Hi everybody,
i'm using RecursiveIteratorIterator() to explore subfolders of my current path, but in this way all trhe tree is explored, instead i want just the direct childern of my fodler to be explored for files. How can i say to RecursiveIteratorIterator() to not go much further and stop to the first subfodlers of the current folder?
Following Lauri Lehtinen, i've tried this:
$it = new RecursiveDirectoryIterator("$directory");
$it->setMaxDepth(1);
i have PHP 5.2.3 but it say me that setMaxDepth is undefined.
Fatal error: Call to undefined method RecursiveDirectoryIterator::setMaxDepth()