gzopen_variation6.phpt 653 B

1234567891011121314151617181920212223242526272829303132333435
  1. --TEST--
  2. Test gzopen() function : variation: relative/absolute file
  3. --EXTENSIONS--
  4. zlib
  5. --FILE--
  6. <?php
  7. echo "*** Testing gzopen() : variation ***\n";
  8. $absfile = __FILE__.'.tmp';
  9. $relfile = "gzopen_variation6.tmp";
  10. $h = gzopen($absfile, "w");
  11. gzwrite($h, "This is an absolute file");
  12. gzclose($h);
  13. $h = gzopen($relfile, "w");
  14. gzwrite($h, "This is a relative file");
  15. gzclose($h);
  16. $h = gzopen($absfile, "r");
  17. gzpassthru($h);
  18. fclose($h);
  19. echo "\n";
  20. $h = gzopen($relfile, "r");
  21. gzpassthru($h);
  22. gzclose($h);
  23. echo "\n";
  24. unlink($absfile);
  25. unlink($relfile);
  26. ?>
  27. --EXPECT--
  28. *** Testing gzopen() : variation ***
  29. This is an absolute file
  30. This is a relative file