Zip class question - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Zip class question (/showthread.php?tid=25557) |
Zip class question - El Forum - 12-16-2009 [eluser]welded[/eluser] I'm using the zip class to make a backup of one directly and save the resulting zip file to another. It works great, but maintains the parent directory structure when I just want the files. To illustrate: Code: The data to save: Downloading and extracting 'backup1.zip' shows the datastore/xml directories and I just want the XML files. Here's the code I've used: Code: $this->load->library('zip'); Do I need to not use read_dir and instead parse the directory and add each XML file individually? |