PHP zip_open() Function
In this chapter you will learn:
- Description for PHP zip_open() Function
- Syntax for PHP zip_open() Function
- Parameter for PHP zip_open() Function
- Return for PHP zip_open() Function
- 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
Parameter | Is Required | Description |
---|---|---|
filename | Required. | 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:
- Description for PHP zip_read() Function
- Syntax for PHP zip_read() Function
- Parameter for PHP zip_read() Function
- Return for PHP zip_read() Function
- Example - reads the next file in a open zip archive
Home » PHP Tutorial » PHP Zip Functions