View Single Post
Old 09-26-2009, 01:18 PM   #2 (permalink)
Salathe
Moderateur
RegEx Guru PHP Guru Top Contributor Advanced Programmer 
 
Salathe's Avatar
 
Join Date: Apr 2007
Posts: 1,393
Thanks: 5
Salathe is on a distinguished road
Default

It seems a bit of a convoluted method of traversing the directories, especially with changing the current working directory so often. You could change the call to the second glob (in the foreach) to use full (or relative) paths rather than just *. Or you could use the handy RecursiveDirectoryIterator which makes life easier.
Salathe is offline  
Reply With Quote