Re: Re: On going ZipArchive saga
| From: | Jeffry Killen | Date: | Tue, 12 May 2015 18:32:54 +0000 |
| Subject: | Re: Re: On going ZipArchive saga | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-324890@lists.php.net to get a copy of this message | ||
On May 12, 2015, at 10:43 AM, Christoph Becker wrote:
Jeffry Killen wrote:Thank you Christoph, I think I will switch to that. So far the only way I have been able to successfully create a zip archive file is with and immediate call to addFromString, or other immediate call to add something to it (without a loop and/or switch block) In this I also have switch to using addFromString in the loop and doing file_get_contents($_addFile) with the same result. If it only works on the simplest level here and not in any other server/php environment, it is enough to be impractical. I occured to me that ZipArchive should return a resource in the same way that fopen,fread, etc do. That way the resource will be preserved inside a loop and/or other branching construct. Thank you for your time and attention JKso, all I get is the string "ZipArchive returned false." without any listing for files that aren't found or are not readableRather insufficient error information, but at least the fact that an error occurred is reported.Ah... is there another compression scheme I can use in php to create archive files... Gzip or bzip? I have looked and don't see any explicit create function for these.You can create tar archives (see class PharData) and then apply gzip or bzip2 compression, to get .tgz resp. .tbz2 files.