actually i've a problem with my zip code...
<?php
$zip = new ZipArchive();
$ret = $zip->open('archive.zip', ZipArchive::OVERWRITE);
if ($ret !== TRUE) {
printf("Fail to open the archive %d", $ret);
} else {
$directory = realpath('../arch');
$options = array('add_path' => 'sources/', 'remove_path' => $directory);
$zip->addPattern('/\.(txt|evn)$/', $directory, $options);
printf("Click <a href=\"archive.zip\">here</a> to download");
$zip->close();
}
?>
It's actually working, but i have some characters like "é" on some files (it's necessary, i can't modify), and when i download the archive, every "é" become "Ú". So, any solution ? It's not like this topic : Here I'm not using the addFile option but addPattern