PHP.nl

gzopen

gzopen

Open gz-file

 **gzopen** string $filename string $mode bool $use_include_path

Opens a gzip (.gz) file for reading or writing.

can be used to read a file which is

not in gzip format; in this case will directly read from the file without decompression. gzopen``gzread

filenameThe file name.

mode As in ( or ) but can also include a compression level () or a strategy: for filtered data as in , for as in . (See the description of in for more information about the strategy parameter.) fopen``rb``wb``wb9``f``wb6f``h``Huffman only compression``wb1h``deflateInit2

use_include_path If set to true, files in the are searched for too. include_path

Returns a file pointer to the file opened, after that, everything you read from this file descriptor will be transparently decompressed and what you write gets compressed.

If the open fails, the function returns false.

Voorbeeld: Example

<?php
$fp = gzopen("/tmp/file.gz", "r");
?>

gzclose