- 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_open() function in PHP
The zip_entry_open() function is used to open a zip archive entry for reading.
Syntax
zip_entry_open(zip_file,zip_entry,mode)
Parameters
zip_file − The zip file to be read
zip_entry − The zip entry to open.
mode − The type of access needed for zip archive
Return
The zip_entry_open() function Returns TRUE on success, or FALSE on failure.
Example
<?php $zip_file = zip_open("new.zip"); $zip_entry = zip_read($zip_file); zip_entry_open($zip_file, $zip_entry, "rb"); $myfile = zip_entry_name($zip_entry); if($myfile == true) echo("Zip file: " . $file . " is opened now!<br>"); $flag = zip_entry_close($zip_entry); if ($flag == true) echo("$file . " closed!"); zip_close($zip_file); ?>
Output
new/one is opened now! new/one closed!
Advertisements