Home >Backend Development >PHP Tutorial >zip_entry_name() function in PHP
zip_entry_name() function returns the name of the zip archive file.
zip_entry_name(zip_entry)
zip_entry − The zip file opened using zip_open() is mentioned here.
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".
<?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); } ?>
File Name = amit.txt File Name = peter.txt File Name = result.html File Name = demo.java File Name = settings.ini
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!