CI_Zip::download()

download($filename = 'backup.zip')

Parameters:
  • $filename (string) – Archive file name
Return type:

void

Causes the Zip file to be downloaded from your server. You must pass the name you would like the zip file called. Example:

$this->zip->download('latest_stuff.zip'); // File will be named "latest_stuff.zip"

Note

Do not display any data in the controller in which you call this method since it sends various server headers that cause the download to happen and the file to be treated as binary.

doc_CodeIgniter
2016-10-15 16:32:08
Comments
Leave a Comment

Please login to continue.