I want to make and download archive from my existing files. I tried to following code.
The CodeIgniter zip library is broken, and the framework is no longer being maintained. read_file() doesn't work very well. Use add_data().
add_data() takes two params:
In practice, this would be:
$this->zip->add_data('my_spreadsheet.xls', '/upload/ut/10_33_statement.xls'); $this->zip->download('my_spreadsheet.zip');