PHP zip_entry_close() Function
In this chapter you will learn:
- Description for PHP zip_entry_close() Function
- Syntax for PHP zip_entry_close() Function
- Parameter for PHP zip_entry_close() Function
- Return for PHP zip_entry_close() Function
- Example - closes a zip archive opened by the zip_entry_open() function
Description
The zip_entry_close() function closes a zip archive opened by the zip_entry_open() function.
Syntax
PHP zip_entry_close() Function has the following syntax.
zip_entry_close(zip_entry)
Parameter
Parameter | Is Required | Description |
---|---|---|
zip_entry | Required. | Zip entry resource to close (a zip entry opened with zip_read() ) |
Return
Returns TRUE on success or FALSE on failure.
Example
Closes a zip archive opened by the zip_entry_open() function
<?php/*from j a va 2 s. c om*/
$zip = zip_open("test.zip");
if ($zip){
while ($zip_entry = zip_read($zip)){
echo "Name: " . zip_entry_name($zip_entry);
if (zip_entry_open($zip, $zip_entry)){
// some code
zip_entry_close($zip_entry);
}
}
zip_close($zip);
}
?>
Next chapter...
What you will learn in the next chapter:
- Description for PHP zip_entry_compressedsize() Function
- Syntax for PHP zip_entry_compressedsize() Function
- Parameter for PHP zip_entry_compressedsize() Function
- Return for PHP zip_entry_compressedsize() Function
- Example - returns the compressed file size of a zip archive entry
Home » PHP Tutorial » PHP Zip Functions