Home of web learners

www.webn3rd.com

PHP have library to work with zip

Lets look an example:

 <?php

$zob 
= new ZipArchive;

$zob->open("roky.zip");

$zip->extractTo("./");

?>

We have a zip file name roky.zip where two file included,one is a text file another word is a excel file,so by make a object named zob,then we use open method from there and assign our zip file name

Now next line we use extractTo method to extract all file included in zip with extract location,here we use same directory of zip file,so after run it,we got all file in directory of zip file extracted

webn3rd.com

About webn3rd