[eluser]yannyannyann[/eluser]
Hello all ,
I am trying to use the DOWNLOAD Helper as well as the ZIP CLASS without success.
I would like to zip 3 JPGs and download them.
I have tried using these lines from the controler,
Code:
$data = file_get_contents("./public/photos/highres/1afc8_9_2009-03-20.jpg");
$name= '1afc8_9_2009-03-20.jpg';
force_download($name, $data);
or
Code:
$this->zip->read_file("./public/photos/highres/1afc8_9_2009-03-20.jpg");
$this->zip->download('test.zip');
But I am having the header error :
Code:
A PHP Error was encountered
Severity: Warning
Message: Cannot modify header information - headers already sent by (output started at /Users/......./system/application/models/media_model.php:538)
Filename: helpers/download_helper.php
Line Number: 86
I need help !!
thanks in advance !!