Hey everyone.
I was just wondering if anyone had any input on this. I am building a content management site, and for one of the accounts, they send me all of their documentation in the form of a zipped website. Is there a way I can upload the zipped file through DataObjectManager, then have it extract into the database, allowing a link on the account page to go to their index.htm file?
any help would be appreciated.
Thanks.
James
Update:
Found this script to unzip files. I am just not sure how to implement it in the process.
<?php
$zip = zip_open("zip.zip");
if ($zip) {
while ($zip_entry = zip_read($zip)) {
$fp = fopen("zip/".zip_entry_name($zip_entry), "w");
if (zip_entry_open($zip, $zip_entry, "r")) {
$buf = zip_entry_read($zip_entry, zip_entry_filesize($zip_entry));
fwrite($fp,"$buf");
zip_entry_close($zip_entry);
fclose($fp);
}
}
zip_close($zip);
}
?>