Z
Z
zt502011-07-07 15:26:20
PHP
zt50, 2011-07-07 15:26:20

PHP, ZipArchive, addFile runtime

Hello!

I noticed such a thing, on some servers ZipArchive-> addFile sends the desired file to be added to the archive in the background, and does not do it in real time, in accordance with this, when I do ZipArchive-> close, in fact, it does not close it, but writes to it some more time.

How can I avoid this?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
G
Gesper, 2011-07-07
@Gesper

From the
ZipArchive::close
Close opened or created archive and save changes documentation .
All changes in the archive are saved only after calling the close() method. If you haven't called it explicitly, then it is automatically called after the end of the script execution.

A
Andrew, 2011-07-07
@Morfi

Close and reopen after each file.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question