mirror of
https://github.com/php/php-src.git
synced 2024-12-18 22:41:20 +08:00
35 lines
587 B
PHP
35 lines
587 B
PHP
--TEST--
|
|
Test function readgzfile() reading a plain relative file
|
|
--SKIPIF--
|
|
<?php
|
|
if (!extension_loaded('zlib')) die ('skip zlib extension not available in this build');
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
$plaintxt = b<<<EOT
|
|
hello world
|
|
is a very common test
|
|
for all languages
|
|
|
|
EOT;
|
|
$dirname = 'readgzfile_temp';
|
|
$filename = $dirname.'/plainfile.txt';
|
|
mkdir($dirname);
|
|
$h = fopen($filename, 'w');
|
|
fwrite($h, $plaintxt);
|
|
fclose($h);
|
|
|
|
|
|
var_dump(readgzfile( $filename ) );
|
|
|
|
unlink($filename);
|
|
rmdir($dirname);
|
|
?>
|
|
===DONE===
|
|
--EXPECT--
|
|
hello world
|
|
is a very common test
|
|
for all languages
|
|
int(52)
|
|
===DONE===
|