Created
December 18, 2012 21:11
-
-
Save ramonornela/4332046 to your computer and use it in GitHub Desktop.
Geração XML Joomla
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
define('DIR_COMP', '<path>'); | |
$objects = new RecursiveIteratorIterator( | |
new RecursiveRegexIterator( | |
new RecursiveDirectoryIterator(DIR_COMP), | |
'/^(?!.*(\.svn|\.cvs)).*$/', | |
RecursiveRegexIterator::MATCH | |
), | |
RecursiveIteratorIterator::SELF_FIRST | |
); | |
foreach($objects as $name => $object){ | |
if ($object->isFile()) { | |
echo '<filename>', str_replace(DIR_COMP, '', $object->getPathName()), "</filename>\n"; | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment