Hi All, I'm sorta stuck on this one. Hopefully some of you folks can help me out...
My question in a nutshell: Is there a way to have PHP extract all of the files from an archive without preserving the directory structure?
A site I'm working on allows users to upload pictures. I've just added support for Zip files, so that PHP extracts the images from the Zip, moves them to the appropriate directory, and catalogs them in the MySQL database. To do this, the names of the files are put into an array.
The problem is that if the Zip file contains any sub-directories, the name of the sub-directory is written to the array and the files contained within are skipped. I understand that this is because PHP is seeing the sub-directory as a file and not a directory.