gzfile
Description
Syntax
gzfile(
string $filename,
int $use_include_path = 0
): array|falseParameters
filename
The file name.
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 an array containing the file, one line per cell, empty lines included, and with newlines still attached, or false on failure.
Examples
1 · filename
<? $filename = $_SERVER["DOCUMENT_ROOT"] . "/assets/gz/1.gz"; $return = gzfile($filename); print_r($return);
Array
(
[0] => data
)
2 · use_include_path · 0
<? $filename = $_SERVER["DOCUMENT_ROOT"] . "/assets/gz/1.gz"; $use_include_path = 0; $return = gzfile($filename, $use_include_path); print_r($return);
Array
(
[0] => data
)
3 · use_include_path · 1
<? $filename = $_SERVER["DOCUMENT_ROOT"] . "/assets/gz/1.gz"; $use_include_path = 1; $return = gzfile($filename, $use_include_path); print_r($return);
Array
(
[0] => data
)