002.phpt 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. --TEST--
  2. File/Stream functions
  3. --FILE--
  4. <?php
  5. $data = <<<EOD
  6. blah blah blah blah blah blah blah
  7. blah blah blah blah blah blah blah
  8. blah blah blah blah blah blah blah
  9. blah blah blah blah blah blah blah
  10. blah blah blah blah blah blah blah
  11. blah blah blah blah blah blah blah
  12. blah blah blah blah blah blah blah
  13. blah blah blah blah blah blah blah
  14. blah blah blah blah blah blah blah
  15. blah blah blah blah blah blah blah
  16. blah blah blah blah blah blah blah
  17. blah blah blah blah blah blah blah
  18. blah blah blah blah blah blah blah
  19. blah blah blah blah blah blah blah
  20. blah blah blah blah blah blah blah
  21. blah blah blah blah blah blah blah
  22. EOD;
  23. $name = tempnam("./ext/standard/tests/file/", "php");
  24. $fp = fopen($name, "w");
  25. fwrite($fp, $data);
  26. fclose($fp);
  27. //readfile($name);
  28. echo file_get_contents($name);
  29. unlink($name);
  30. ?>
  31. --EXPECT--
  32. blah blah blah blah blah blah blah
  33. blah blah blah blah blah blah blah
  34. blah blah blah blah blah blah blah
  35. blah blah blah blah blah blah blah
  36. blah blah blah blah blah blah blah
  37. blah blah blah blah blah blah blah
  38. blah blah blah blah blah blah blah
  39. blah blah blah blah blah blah blah
  40. blah blah blah blah blah blah blah
  41. blah blah blah blah blah blah blah
  42. blah blah blah blah blah blah blah
  43. blah blah blah blah blah blah blah
  44. blah blah blah blah blah blah blah
  45. blah blah blah blah blah blah blah
  46. blah blah blah blah blah blah blah
  47. blah blah blah blah blah blah blah