mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
- Use INI sections - Use CGI sections - Move data into a subfolder - Remove ZPP tests - Fix various bugs within tests - Simplify some Found while working on #18879
41 lines
635 B
PHP
41 lines
635 B
PHP
--TEST--
|
|
Test function gzfile() reading a plain relative file
|
|
--EXTENSIONS--
|
|
zlib
|
|
--FILE--
|
|
<?php
|
|
$plaintxt = <<<EOT
|
|
hello world
|
|
is a very common test
|
|
for all languages
|
|
EOT;
|
|
$dirname = 'gzfile_temp2';
|
|
$filename = $dirname.'/gzfile_basic2.txt';
|
|
mkdir($dirname);
|
|
$h = fopen($filename, 'w');
|
|
fwrite($h, $plaintxt);
|
|
fclose($h);
|
|
|
|
|
|
var_dump(gzfile( $filename ) );
|
|
|
|
?>
|
|
--CLEAN--
|
|
<?php
|
|
$dirname = 'gzfile_temp2';
|
|
$filename = $dirname.'/gzfile_basic2.txt';
|
|
@unlink($filename);
|
|
@rmdir($dirname);
|
|
?>
|
|
--EXPECT--
|
|
array(3) {
|
|
[0]=>
|
|
string(12) "hello world
|
|
"
|
|
[1]=>
|
|
string(22) "is a very common test
|
|
"
|
|
[2]=>
|
|
string(17) "for all languages"
|
|
}
|