Greetings,
What I’d like to do is add the same php file to each directory/sub-directory that is expanded from a zip file. I already have a working unzip class, I want to add this functionality to it. So, image we have a zip file that has the following directory structure:
Foo.zip
FolderA
image1.jpg
image2.jpg
FolderB
image3.jpg
FolderB1image4.jpg
image5.jpg
Now let’s say I have a php file (viewer.php) which is an image gallery script. What I want is after the zip extracts it places this php file in each directory so that I can view the images automatically from my browser. So the directory structure on my server would look like this after the unzip script has run:
Foo.zip
FolderA
image1.jpg
image2.jpg
viewer.php
FolderB
image3.jpg
viewer.php
FolderB1image4.jpg
image5.jpg
viewer.php
I’ve Googled my heart out trying to find how to copy a single file recursively and at least for me, I can’t seem to find an answer. Any thoughts/suggestions?
Thanks in advance!