$fileSPLObjects = new RecursiveIteratorIterator(
new RecursiveDirectoryIterator($directory),
RecursiveIteratorIterator::CHILD_FIRST
);
try {
foreach( $fileSPLObjects as $fullFileName => $fileSPLObject ) {
echo "
";
echo '
';
print_r($fileSPLObject);
//$_path=pathinfo($fileSPLObject->getFilename());
//dirname('c:/Temp/x')
//echo $_path['dirname'].$_path['basename'];
}
}
catch (UnexpectedValueException $e) {
printf("Dir [%s] contained a dodgy folder", $directory);
}?>
No comments:
Post a Comment