Files are getting zipped..but once i extracting the zip file, the result is single file..not a multiple file.How to zip multiple file using zend filter(Zip)..?
Here is my code..
//zip part
$filter = new Compress(array(
'adapter' => 'Zip',
'options' => array(
'archive' => TEMP_UPLOAD_PATH . DIRECTORY_SEPARATOR. "download" . DIRECTORY_SEPARATOR . $result['downloadResult']->r_download_id.'.zip'
)
));
$file_list = scandir(TEMP_UPLOAD_PATH . DIRECTORY_SEPARATOR. "download". DIRECTORY_SEPARATOR . $result['downloadResult']->r_download_id);
if(count($file_list) >2){
foreach ($file_list as $file) {
if (in_array($file, array(".",".."))) continue;
$filter->filter(TEMP_UPLOAD_PATH . DIRECTORY_SEPARATOR. "download". DIRECTORY_SEPARATOR . $result['downloadResult']->r_download_id . DIRECTORY_SEPARATOR . $file);
}
}
//zip end