[eluser]chefnelone[/eluser]
[quote author="Cristian Gilè" date="1294429416"]Do you call zip_files function from an anchor?
Please, paste here a reduction code of your controller and view.[/quote]
It is a little more complicated, is Ajax through jQuery when a form is submitted.
But for the test I'm not using the $_POST data sent for the ajax request. Just to be sure that the error is not generated for the data sent
js:
Code:
$('.form_class').live('submit', function(eve){
eve.preventDefault();
//console.log( $(this).serialize() );
$.post(base_url + 'download/zip_files' , $(this).serialize() , function(html){
});
});
php:
Code:
function zip_files()
{
//NOT USING THE $_POST DATA
$this->load->library('zip');
$path = 'images/myImage.jpg';
//$this->firephp->log( $path );
$this->zip->read_file($path);
// Download the file to your desktop. Name it "my_backup.zip"
$this->zip->download('my_backup.zip');
}