// 파일명
$zip = zip_open("aa.zip");
while( $entry = zip_read($zip) )
{
echo "Name: " . zip_entry_name($entry) . "
";
echo "Actual Filesize: " . zip_entry_filesize($entry) . "
";
echo "Compressed Size: " . zip_entry_compressedsize($entry) . "
";
echo "Compressed Method:" . zip_entry_compressionmethod($entry) . "
";
if(zip_entry_compressionmethod($entry)=="stored" && zip_entry_filesize($entry)==0)
{
mkdir(zip_entry_name($entry), 0744);
continue;
}
if(zip_entry_open($zip, $entry))
{
$zer = zip_entry_read($entry);
$fp = fopen(zip_entry_name($entry), "w");
fwrite($fp, $zer);
fclose($fp);
zip_entry_close($entry);
}
}
zip_close($zip);