zip_entry_read
Read an open project in the ZIP file.
The zip_entry_read() function gets the content from the open zip archive project.
If successful, the content of the project is returned. If it fails, false is returned.
<?php
$zip = zip_open("test.zip");
if ($zip)
{
while ($zip_entry = zip_read($zip))
{
echo "<p>";
echo "Name: " . zip_entry_name($zip_entry) . "<br />";
if (zip_entry_open($zip, $zip_entry))
{
echo "File Contents:<br/>";
$contents = zip_entry_read($zip_entry);
echo "$contents<br />";
zip_entry_close($zip_entry);
}
echo "</p>";
}
zip_close($zip);
}
?>
zip_entry_read ( zip_entry , length )
| parameter | describe |
|---|---|
| zip_entry | Required. Specifies the zip project resource to be read (zip project opened by zip_read()). |
| length | Optional. Specifies the number of bytes returned. The default is 1024. |