- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
zip_entry_close() function in PHP
The zip_entry_close() function is used to close a zip archive opened by the zip_entry_open() function.
Syntax
zip_entry_close(zip_entry)
Parameters
zip_entry − The zip entry resource. Required.
Return
The zip_entry_close() function Returns TRUE on success and FALSE on failure.
The following is an example. Let’s say we have "new.zip" file as our archive.
Example
<?php $zip = zip_open("new.zip"); $zip_entry = zip_read($zip); zip_entry_open($zip, $zip_entry, "rb"); $myfile = zip_entry_name($zip_entry); $res = zip_entry_close($zip_entry); if ($res == true) echo("$myfile closed! "); else echo("$myfile cannot be closed!"); zip_close($zip); ?>
Advertisements