Zip file creation
Posted: Sat Feb 21, 2009 5:10 am
Hi
Using the below code I am creating .zip file. But two zip files are created namly data_t.zip.a00252 and data_t.zip.b00252. Please help me to clear this
<?
$zip = new ZipArchive();
$filename = "data_t.zip";
if ($zip->open($filename, ZIPARCHIVE::CREATE)!==TRUE)
{
exit("cannot open <$filename>\r\n");
}
$zip->addFile("test1.txt");
$zip->addFile("test2.txt");
$zip->close();
?>
Using the below code I am creating .zip file. But two zip files are created namly data_t.zip.a00252 and data_t.zip.b00252. Please help me to clear this
<?
$zip = new ZipArchive();
$filename = "data_t.zip";
if ($zip->open($filename, ZIPARCHIVE::CREATE)!==TRUE)
{
exit("cannot open <$filename>\r\n");
}
$zip->addFile("test1.txt");
$zip->addFile("test2.txt");
$zip->close();
?>