PHP zip_open() Function

In this chapter you will learn:

  1. Description for PHP zip_open() Function
  2. Syntax for PHP zip_open() Function
  3. Parameter for PHP zip_open() Function
  4. Return for PHP zip_open() Function
  5. Example - opens a zip archive for reading

Description

The zip_open() function opens a zip archive for reading.

Syntax

PHP zip_open() Function has the following syntax.

zip_open(filename)

Parameter

ParameterIs RequiredDescription
filenameRequired.Filename and path of the zip file to open

Return

This function returns a open zip file resource on success, or FALSE on failure.

Example

Open a zip archive for reading


<?php//from   j a  va 2  s. c  om
   $zip = zip_open("test.zip");
   zip_read($zip);
   zip_close($zip);
?>

Next chapter...

What you will learn in the next chapter:

  1. Description for PHP zip_read() Function
  2. Syntax for PHP zip_read() Function
  3. Parameter for PHP zip_read() Function
  4. Return for PHP zip_read() Function
  5. Example - reads the next file in a open zip archive
Home » PHP Tutorial » PHP Zip Functions
PHP Zip Library Installation
PHP zip_close() Function
PHP zip_entry_close() Function
PHP zip_entry_compressedsize() Function
PHP zip_entry_compressionmethod() Function
PHP zip_entry_filesize() Function
PHP zip_entry_name() Function
PHP zip_entry_open() Function
PHP zip_entry_read() Function
PHP zip_open() Function
PHP zip_read() Function