Home > Article > Backend Development > zip_open() function in PHP
zip_open() function opens a zip file for reading. Returns an open zip file on success, FALSE on failure.
zip_open(zip_file)
zip_file - The path to the file to open.
zip_open() function returns an open zip file on success and FALSE on failure.
<?php $zip = zip_open("new.zip"); if ($zip) { while ($zip_entry = zip_read($zip)){ echo "Compressed = ". zip_entry_compressedsize($zip_entry). "<br/>"; } zip_close($zip); } ?>
Compressed: 90 Compressed: 12 Compressed: 67
The above is the detailed content of zip_open() function in PHP. For more information, please follow other related articles on the PHP Chinese website!