Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
PHP: ZipArchive::close - Manual
[go: Go Back, main page]

downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

ZipArchive::deleteIndex" width="11" height="7"/> <ZipArchive::addFromString
Last updated: Fri, 26 Nov 2010

view this page in

ZipArchive::close

(PHP 5 >= 5.2.0, PECL zip >= 1.1.0)

ZipArchive::closeアクティブな (オープンされた、あるいは新しく作成された) アーカイブを閉じる

説明

bool ZipArchive::close ( void )

オープンされた、あるいは作成されたアーカイブを閉じ、 変更内容を保存します。このメソッドは、 スクリプトの最後で自動的にコールされます。

パラメータ

この関数にはパラメータはありません。

返り値

成功した場合に TRUE を、失敗した場合に FALSE を返します。



add a note add a note User Contributed Notes
ZipArchive::close
jared at kippage dot com
03-Sep-2009 01:08
It may seem a little obvious to some but it was an oversight on my behalf.

If you are adding files to the zip file that you want to be deleted make sure you delete AFTER you call the close() function.

If the files added to the object aren't available at save time the zip file will not be created.
gilthans at gmail dot com
22-Oct-2007 06:16
Don't forget to check the zip isn't empty, folks - otherwise the zip won't be created at all, and the server will issue no warning!

I used a certain loop to add files to the zip, and struggled with permissions and documentation for hours before I realize the loop ended up adding no file, even though addFile WAS called, but on a non-existent file.
This might be the reason your zips aren't popping up.

 
show source | credits | sitemap | contact | advertising | mirror sites