Re: How to use zip extension

From: Date: Wed, 22 Mar 2006 20:25:02 +0000
Subject: Re: How to use zip extension
References: 1  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-3648@lists.php.net to get a copy of this message
On Wed, 22 Mar 2006 15:22:56 -0300 darko@uvcms.com (Darko Miletic) wrote: > Hi, > > I have a fedora core 3 server with PHP 5.1.7 and among others > installed PECL zip extension 1.2.1 alpha. > > I'm unable to add any file to zip archive. > > Here is my test code: > > $flist = file("/courses/filelist.lst"); > $zip = new Zip(); > $zip->open("/courses/test1.zip"); > foreach ($flist as $fl) { > $fullname = $courseFolder.'/'.$fl; > $zip->addFile($fullname); > } > $zip->close(); > unset($zip); > > If I create zip file with one archive object is created but no files > are being added. If there is no zip file new one is not created. > > Am I missing something here? Yes and no :-) No because I did a mistake in the last release (fixed in cvs) and thank you for the head up :) And yes because you should check $zip->status, it will tell you if something went wrong (each function call can change it). You can try again with the freshly released zip-1.2.2. --Pierre

« previous php.pecl.dev (#3648) next »