<?php
$zip = zip_open(realpath("./text.zip"));
if ($zip) {
while ($zip_entry = zip_read($zip))
{
if (zip_entry_open($zip, $zip_entry, "r")) {
$fp = fopen(zip_entry_name($zip_entry),"w");
$buf = zip_entry_read($zip_entry, zip_entry_filesize($zip_entry));
fwrite($fp,$buf);
fclose($fp);
zip_entry_close($zip_entry);
}
}
zip_close($zip);
}
?>