You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extract ZIP files in CodeIgniter without installing any PECL extensions for PHP.
[h3]Download[/h3]
[url=http://bitbucket.org/philsturgeon/codeigniter-unzip/get/tip.zip]ZIP[/url], [url=http://bitbucket.org/philsturgeon/codeigniter-unzip/get/tip.tar.gz]GZ[/url], [url=http://bitbucket.org/philsturgeon/codeigniter-unzip/get/tip.tar.bz2]BZ2[/url] from [url=http://bitbucket.org/philsturgeon/]BitBucket[/url]
[h3]Requirements[/h3]
PHP 5.1+
CodeIgniter 1.6.x - 2.0-dev
ZLib extension enabled
[h3]Usage[/h3]
$this->load->library('unzip');
// Optional: Only take out these files, anything else is ignored$this->unzip->allow(array('css', 'js', 'png', 'gif', 'jpeg', 'jpg', 'tpl', 'html', 'swf'));
// Give it one parameter and it will extract to the same folder$this->unzip->extract('uploads/my_archive.zip');
// or specify a destination directory$this->unzip->extract('uploads/my_archive.zip', '/path/to/directory/);