readgzfile
Description
The readgzfile of zlib for PHP outputs a gz-file.
Syntax
readgzfile( string $filename, int $use_include_path = 0 ): int|false
Parameters
filename
The file name. This file will be opened from the filesystem and its contents written to standard output.
use_include_path
You can set this optional parameter to 1, if you want to search for the file in the include_path too.
Return
Returns the number of (uncompressed) bytes read from the file on success, or false on failure
Examples
1 · filename
<? $filename = $_SERVER["DOCUMENT_ROOT"] . "/assets/gz/1.gz"; readgzfile($filename);
data
2 · use_include_path · 0
<? $filename = $_SERVER["DOCUMENT_ROOT"] . "/assets/gz/1.gz"; $use_include_path = 0; readgzfile($filename, $use_include_path);
data
3 · use_include_path · 1
<? $filename = $_SERVER["DOCUMENT_ROOT"] . "/assets/gz/1.gz"; $use_include_path = 1; readgzfile($filename, $use_include_path);
data
4 · return
<? $filename = $_SERVER["DOCUMENT_ROOT"] . "/assets/gz/1.gz"; $return = readgzfile($filename); echo PHP_EOL . $return;
data 4