The zip_entry_name() function returns the name of a zip archive entry.
zip_entry_name(zip_entry)
Parameter | Is Required | Description |
---|---|---|
zip_entry | Required. | Zip entry resource to read (a zip entry opened with zip_read() ) |
The name of the directory entry.
Returns the name of a zip archive entry
<?php//from w w w . j a v a 2 s . c om
$zip = zip_open("test.zip");
if ($zip){
while ($zip_entry = zip_read($zip)){
echo "Name: " . zip_entry_name($zip_entry);
}
zip_close($zip);
}
?>