Is there any way to unpack or extract a zip file with PHP that does not rely on any installed extension? Has anyone written a class or something that can handle it?
Alternatively, is there a solution that uses an extension that is relatively commonly installed on most servers?
I need this to work on as many different servers that I have no control over as possible.
Thanks for any help!
Check this lib it helps to solve same problem
require_once('pclzip.lib.php');
$archive = new PclZip(dirname(__FILE__).'/Archive.zip');
if ($archive->extract(PCLZIP_OPT_PATH, dirname(__FILE__).'/extract') == 0) {
echo "\n error while extract";
} else {
echo "\n extract ok";
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With