I have multiple image in folder, and I get it on href button. So how to zip that file in codeigniter.
Here is my View Code:
<a href="<?php echo base_url()."index.php/itr1/download/".$key['pan_card']."/".$key['previous_itr'] ?>" name="images">Downalod All Attachments</a>
Here is my Controller:
public function download()
{
// File path
$id = $this->uri->segment(3);
$id1 = $this->uri->segment(4);
$filepath1 = FCPATH.'upload/'.$id;
$filepath2 = FCPATH.'upload/'.$id1;
$filename = "backup.zip";
$this->zip->download($filename);
}