We know PHP is very reliable language.IT has many features.One of feature is file.We can extract zip file using php with following code.
<?php
include("ZipArchive.php");
//Create the object
$zip = new ZipArchive();
// open archive
if ($zip->open('../test1.zip') !== TRUE) {
die ("Could not open archive");
}
// extract contents to destination directory
$zip->extractTo('../ZIP_extract/');
//Close the archive
$zip->close();
echo "Archive extracted to ZIP_extract folder!";
?>
No comments :
Post a Comment