How to use zip open in PHP

In this article I am going to explain about zip_open function in PHP.
  • 1595

PHP zip_open function

The PHP zip_open function is used to open a zip archive for reading. This function returns open zip file resource on success, or false on failure.


Syntax of zip_open function

zip_open(fileName)

Parameters in zip_open function

It has only one parameter:

Parameter Description
fileName It specifies the file name, which you want to open.

Example of PHP zip_open function

<?php

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

if(!$Zip)

{

echo "Unable to open zip file";

}

zip_read($Zip);

zip_close($Zip);

?>


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.