How to use zip entry open in PHP
In this article I am going to explain about zip_entry_open function in PHP.
PHP zip_entry_open() Function
The PHP zip_entry_open function is used to open a zip archive entry for reading.
Syntax of zip_entry_open function
zip_entry_open(zip, zipEntry, mode) |
Parameters in zip_entry_open function
It have three parameter:
Parameter |
Description |
zip |
It specifies a zip entry resource to read. |
zipEntry |
It specifies a zip entry resource to open. |
mode |
It specifies the type of access you require to the zip archive. |
Example of zip_entry_open function
<?php
$Zip=zip_open("email.zip");
if(!$Zip)
{
echo "Unable to open zip file";
}
else
{
while($zipEntry=zip_read($Zip))
{
if(zip_entry_open($Zip,$zipEntry))
{
echo "File is has been opened";
}
}
}
?>
|
Output:
You may also want to read these related articles :here
Ask Your Question
Got a programming related question? You may want to post your question here
Programming Answers here