我想通过单击下载按钮下载zip格式的图像文件。
视图
<table class="table" id="ItrDetailTable">
<thead class="ItrDetailThead">
<tr>
<th scope="col">Sr.No.</th>
<th scope="col">Pan No.</th>
<th scope="col">Mobile</th>
<th scope="col">Assestment Year</th>
<th scope="col">Residential Status</th>
<th scope="col">Employee Category</th>
<th scope="col">Payment Status</th>
<th scope="col">ITR Status</th>
<th scope="col">Action</th>
</tr>
</thead>
<tbody id="myTable">
<?php if (count($records)):
$count = $this->uri->segment(3);
$key = +$count;
?>
<?php $n = 1;
foreach (@$records as $record): ?>
<tr>
<th scope="row"><?php echo $key++ + 1; ?></th>
<td class="ItrDetailTd"> <?php echo $record->panno; ?></td>
<td class="ItrDetailTd"><?php echo $record->mobno; ?></td>
<td class="ItrDetailTd"><?php echo $record->assessment_year; ?> </td>
<td class="ItrDetailTd"> <?php echo $record->residential_status; ?></td>
<td class="ItrDetailTd"> <?php echo $record->employee_category; ?> </td>
<td class="ItrDetailTd"> <?php echo $record->Payment_Status; ?> </td>
<td class="ItrDetailTd"> <?php echo $record->itr_status; ?> </td>
<td class="ItrDetailTd">
<a title="View" href="<?php echo base_url('admin/orders_history?itr_id=' . $record->id) ?>"
class="btn btn-primary">View Orders </a>
<a href="<?php echo base_url("Admin/DownloadITRDetails/{$record->id}"); ?>"> <button type="button" class="btn btn-primary">Download</button></a> </td>
</tr>
<?php endforeach; endif; ?>
</tbody>
</table>
控制器
public function DownloadITRDetails($record_id)
{
$this->load->library('zip');
$this->load->helper('file');
$path = "./services/v3/uploads/FORM16/";
$files = get_filenames($path);
// print_r($files);die;
foreach ($files as $file) {
$this->zip->read_file($path . $file, true);
}
$this->zip->download("download files");
}
This is my page image.i want to download all images by their ids.