zip_entry_name() function in PHP

WBOY
Release: 2023-09-18 10:46:02
forward
867 people have browsed it

zip_entry_name() function in PHP

zip_entry_name() function returns the name of the zip archive file.

Syntax

zip_entry_name(zip_entry)
Copy after login

Parameters

  • zip_entry − The zip file opened using zip_open() is mentioned here.

Return value

zip_entry_name() function returns the name of the zip archive file.

The following is an example. Suppose we have 5 files in zip archive "new.zip".

Example

<?php
   $zip = zip_open("new.zip");
   if ($zip) {
      while ($zip_entry = zip_read($zip)) {
         echo "File Name = ". zip_entry_filename($zip_entry). "<br />";
      }
      zip_close($zip);
   }
?>
Copy after login

Output

File Name = amit.txt
File Name = peter.txt
File Name = result.html
File Name = demo.java
File Name = settings.ini
Copy after login

The above is the detailed content of zip_entry_name() function in PHP. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!