note 86209 deleted from ref.zip by danbrown

From: Date: Wed, 29 Jun 2011 15:24:37 +0000
Subject: note 86209 deleted from ref.zip by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-181043@lists.php.net to get a copy of this message
Note Submitter: lostdreamer_nl at hotmail dot com ---- in regards to the extracting via unzip.lib.php: Don't forget to also put in the file path. Otherwise you end up with a lot of files in the wrong folder... <?php 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->Path .'/'.$entry->Name, 'w', false); fwrite($fh,$entry->Data); fclose($fh); } ?>

« previous php.notes (#181043) next »