Che Hodgins wrote:
Hi David, see below.
On 5/2/07, David Krings <[EMAIL PROTECTED]> wrote:
Hi!
Is there anything available like next() that will work on
multidimensional arrays?
First of all, thanks for pointing out my brain fart with using the same
key for different values.
Second, what I tried to do is use again the hammer and consider
everything a nail. I upload a ZIP (!!!) archive, extract it, throw the
zip file away, and now break my neck to find out what the files and
folders are! *slaphandonhead*
This:
$zip = zip_open($localzipfile);
if ($zip) {
while ($zip_entry = zip_read($zip)) {
echo "Name: " . zip_entry_name($zip_entry) . "<br
/>";
echo "Actual Filesize: " . zip_entry_filesize($zip_entry) .
"<br />";
echo "<br />";
}
zip_close($zip);
}
does the trick. If the filesize is 0 then it is either just a folder
entry or a file that I don't want anyway. So anything with a file size
bigger than 0 will go into my array, with path and file name.
What really threw me off is that zip_open() does not work with relative
path/file names. Something like ./dir/zip file.zip returns an integer
and not a resource handle! After translating the relative path into a
direct path all things went smoothly.
OK, I keep hammering away then.
David
_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk
NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com
Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php