ImprovedZipArchive is a project mainly written in ..., it's free.
[PHP] [BSD] ImprovedZipArchive is a PHP class which extends the native class ZipArchive from the PHP5 zip extension, in order to do not have to manage any encoding conversion between PHP, file system and zip for the programmer.
Description:
ImprovedZipArchive is a PHP class which extends the native class ZipArchive from the PHP5 zip extension, in order to:
Warning:
ImprovedZipArchive is EXPERIMENTAL. ImprovedZipArchive is free software (BSD) and comes with ABSOLUTELY NO WARRANTY.
Requirements:
PHP 5 with extensions: zip, spl, pcre, mbstring and iconv.
Author:
julp
Many thanks to:
License: BSD
/**
* encodings:
* - php: UTF-8
* - file system: ISO-8859-1
* - zip: CP850 (default)
**/
if (PHP_SAPI != 'cli') {
header('Content-type: text/html; charset=utf-8');
}
$zip = ImprovedZipArchive::create('élèves.zip', 'ISO-8859-1', 'UTF-8', ImprovedZipArchive::ENC_OLD_EUROPEAN);
$zip->addFromString('CM2/Anaïs.txt', 'Un élève de la classe de CM2');
$zip->addFile('CM2/Éloïse.txt');
$zip->addRecursive('/home/julp/CM1/', array('add_path' => '/CM1/', 'remove_path' => '/home/julp/CM1'));
$zip->close();
All:
are welcome.