[eluser]Computerzworld[/eluser]
Hello,
I am using CI Zip library for creating zip. I have one folder & one separate file that can be converted to zip. What I want is to place that particular file inside that folder. How can I do this?
I have used this code for creating zip from file & folder.
Code:
$this->zip->read_dir('./mydir/');
$this->zip->read_file('./assets/site/myfile.php');
$this->zip->download('Mysite_'.$this->session->userdata('title').'_'.date('Y-m-d_H:i:s'));
As myfile.php is created programatically, it is in separate folder & i need all files of mydir to be zipped & myfile.php should be placed inside mydir zip. Currently it is creating zip with myfile.php & mydir at the same level.How can I do that? Please help me. Thanks in advance.