GMgKe586q6suSQnyqZLlGCooeWM

Pages

Search

Friday, March 4, 2011

CodeIgniter - Archiving

$this->load->library('zip');
         
$fname = base_url().'public/js/lucia.js';       
$content = file_get_contents($fname);     
// lucia.js is the name in zip file  
$this->zip->add_data('lucia.js',$content);

$content = file_get_contents(base_url().'/public/css/lucia.css');
$this->zip->add_data('lucia.css',$content);
            
// You get the lucia.zip when you download
$this->zip->download('lucia');       
Share/Bookmark

No comments:

Post a Comment