note 83443 deleted from ref.zip by danbrown
| From: | danbrown@php.net | Date: | Wed, 29 Jun 2011 15:24:53 +0000 |
| Subject: | note 83443 deleted from ref.zip by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-181044@lists.php.net to get a copy of this message | ||
Note Submitter: fgarciarico at gmail dot com
----
Using the same scripts as the last message:
\libraries\zip.lib.php
\libraries\unzip.lib.php
you can also extract all the files included in a zip file. This is my own example:
require_once("zip.lib.php");
require_once("unzip.lib.php");
$zip = new SimpleUnzip();
$filename = "myzippedfile.zip";
$entries = $zip->ReadFile($filename);
foreach ($entries as $entry){
$fh = fopen($entry->Name, 'w', false);
fwrite($fh,$entry->Data);
fclose($fh);
}