Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Unzip

Derek Jones edited this page · 16 revisions
Clone this wiki locally

Category:Library::Zip | Category:Library::Community

Extract ZIP files in CodeIgniter without installing any PECL extensions for PHP.

Download

ZIP, GZ, BZ2 from BitBucket

Requirements

  1. PHP 5.1+
  2. CodeIgniter 1.6.x - 2.0-dev
  3. ZLib extension enabled

Usage

$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/);
Something went wrong with that request. Please try again.