What is zip entry name in PHP

In this article I am going to explain about zip_entry_name function in PHP.
  • 1505

PHP zip_entry_name() Function

The PHP zip_entry_name function is used to returns the name of a zip archive entry.

Syntax of zip_entry_name function

zip_entry_name(zipEntry)

Parameters in zip_entry_name function

It has only one parameter:

Parameter Description
zipEntry It specifies a zip entry resource to read.

Example of zip_entry_name function

<?php

$Zip=zip_open("email.zip");

if(!$Zip)

{

echo "Unable to open zip file";

}

else

{

while($zipEntry=zip_read($Zip))

{

echo "File name is: ". zip_entry_name($zipEntry);

}

zip_close($Zip);

}

?>


Output:

zip-entry-name-php.jpg

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

Categories

More Articles

© 2020 DotNetHeaven. All rights reserved.