opening and extracting a zip file
By admin | May 1, 2008
Well zipping is not a php function. For the zipping functions to work on your server you must download the
Download the Zip PELC extension
And install them ( find the instruction there only on how to )
The example i am going to tell is a simple one
<?php
$zipfile = new ZipArchive;
$zipfile->open(‘file.zip’);
$zipfile->extractTo(‘./’);
$zipfile->close();
echo “the requested file has been extracted”;
?>
open = open the specified zip file inside the braces
extractTo = extract the opened zip file to the location specified
close = closes a zip file
Thanks
krates
Topics: PHP | Comments Off on opening and extracting a zip file
Related Links: