<?php
$zip = new ZipArchive();
$filename = "./test112.zip";
if ($zip->open($filename, ZipArchive::CREATE)!==TRUE) {
exit("ΠΠ΅Π²ΠΎΠ·ΠΌΠΎΠΆΠ½ΠΎ ΠΎΡΠΊΡΡΡΡ <$filename>\n");
}
$zip->addFromString("testfilephp.txt" . time(), "#1 ΠΡΠΎ ΡΠ΅ΡΡΠΎΠ²Π°Ρ ΡΡΡΠΎΠΊΠ° Π΄ΠΎΠ±Π°Π²Π»ΡΠ΅ΡΡΡ Π² ΠΊΠ°ΡΠ΅ΡΡΠ²Π΅ testfilephp.txt.\n");
$zip->addFromString("testfilephp2.txt" . time(), "#2 ΠΡΠΎ ΡΠ΅ΡΡΠΎΠ²Π°Ρ ΡΡΡΠΎΠΊΠ° Π΄ΠΎΠ±Π°Π²Π»ΡΠ΅ΡΡΡ Π² ΠΊΠ°ΡΠ΅ΡΡΠ²Π΅ testfilephp2.txt.\n");
$zip->addFile($thisdir . "/too.php","/testfromfile.php");
echo "numfiles: " . $zip->numFiles . "\n";
echo "status:" . $zip->status . "\n";
$zip->close();
?>