note 104882 added to function.ziparchive-close

From: Date: Wed, 13 Jul 2011 13:27:00 +0000
Subject: note 104882 added to function.ziparchive-close
Groups: php.notes 
Request: Send a blank email to php-notes+get-181458@lists.php.net to get a copy of this message
If ZipArchive::close() returns FALSE and ZipArchive::getStatusString() says "Read error: No such file or directory" perhaps the problem is the new ZipArchive behaviour. In PHP 5.2.x, adding a file by ZipArchive::addFile() actually adds a file into the target zip file, so you can delete the added file from filesystem. If you have 5.2.x code, migrating to PHP 5.3.x, please pay attention to NOT delete the file to be added from filesystem until you call ZipArchive::close(). In other words, ZipArchive will create ZIP file only after you call the close() method. I hope it helps Adriano ---- Server IP: 69.147.83.197 Probable Submitter: 93.40.142.91 ---- Manual Page -- http://www.php.net/manual/en/function.ziparchive-close.php Edit -- https://master.php.net/note/edit/104882 Del: integrated -- https://master.php.net/note/delete/104882/integrated Del: useless -- https://master.php.net/note/delete/104882/useless Del: bad code -- https://master.php.net/note/delete/104882/bad+code Del: spam -- https://master.php.net/note/delete/104882/spam Del: non-english -- https://master.php.net/note/delete/104882/non-english Del: in docs -- https://master.php.net/note/delete/104882/in+docs Del: other reasons-- https://master.php.net/note/delete/104882 Reject -- https://master.php.net/note/reject/104882 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#181458) next »