PHP zip_open() Function

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

resource zip_open ( string $filename )

Returns the compressed size of the specified directory entry.

zip_open — Open a ZIP file archive

Example -

PHP Output Screen

Successfully Zip Archive File Opened.

ParameterDescription
filenameThe file name of the ZIP archive to open.

Return Values-

Returns a resource handle for later use with zip_read() and zip_close() or returns the number of error if filename does not exist or in case of other error.