zip_enrty_read fails to return data
| From: | Matthew Richardson | Date: | Tue, 26 Oct 2004 20:07:49 +0000 |
| Subject: | zip_enrty_read fails to return data | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-24819@lists.php.net to get a copy of this message | ||
Hello,
I'm trying to write the contents of a zip file to disk. Unfortunately
the script creates zero length files. The problem has to be with
zip_entry_read below...
$zipFile = zip_open($uploadFile);
$zipEntry = zip_read($zipFile)
$filePointer = fopen($outputXLSFile, 'w+b');
$fileBuffer = zip_entry_read($zipEntry,
zip_entry_filesize($zipEntry));
fwrite($filePointer, $fileBuffer);
fclose($filePointer);
Thoughts?
Thanks in advance!