bzerror
Description
Syntax
bzerror(
resource $bz
): arrayParameters
bz
The file pointer. It must be valid and must point to a file successfully opened by bzopen().
Return
Returns an associative array, with the error code in the errno entry, and the error message in the errstr entry.
Examples
1 · bz · array
<?
$file = $_SERVER["DOCUMENT_ROOT"] . "/assets/bz2/1.bz2";
$mode = "r";
$bz = bzopen($file, $mode);
if($bz === false)
{
die("bzopen");
}
$return = bzerror($bz);
print_r($return);
bzclose($bz);
Array
(
[errno] => 0
[errstr] => OK
)
2 · bz · array · index
<?
$file = $_SERVER["DOCUMENT_ROOT"] . "/assets/bz2/1.bz2";
$mode = "r";
$bz = bzopen($file, $mode);
if($bz === false)
{
die("bzopen");
}
$return = bzerror($bz);
echo $return["errno"] . PHP_EOL;
echo $return["errstr"];
bzclose($bz);
0 OK