Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/philsturgeon/codeigniter-unzip
Extract ZIP files in CodeIgniter without installing any PECL extensions for PHP.
https://github.com/philsturgeon/codeigniter-unzip
Last synced: 20 days ago
JSON representation
Extract ZIP files in CodeIgniter without installing any PECL extensions for PHP.
- Host: GitHub
- URL: https://github.com/philsturgeon/codeigniter-unzip
- Owner: philsturgeon
- Created: 2010-10-26T09:09:13.000Z (about 14 years ago)
- Default Branch: master
- Last Pushed: 2011-08-05T17:14:56.000Z (over 13 years ago)
- Last Synced: 2024-05-01T23:46:20.255Z (6 months ago)
- Language: PHP
- Homepage:
- Size: 463 KB
- Stars: 78
- Watchers: 10
- Forks: 43
- Open Issues: 2
-
Metadata Files:
- Readme: README.markdown
Awesome Lists containing this project
- awesome-codeigniter - CodeIgniter-Unzip - Extract ZIP files in CodeIgniter without installing any PECL. (Libraries)
README
CodeIgniter-Unzip
============Extract ZIP files in CodeIgniter without installing any PECL extensions for PHP.
Requirements
------------1. PHP 5.1+
2. CodeIgniter 1.6.x - 2.0-dev
3. ZLib extension enabledUsage
-----$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/);Simple as that!
To-do
------ Add extract_file() to extract a specific file from your ZIP.