opendir-002.phpt 559 B

1234567891011121314151617181920212223242526272829
  1. --TEST--
  2. opendir() with 'ftp://' stream.
  3. --SKIPIF--
  4. <?php
  5. if (array_search('ftp',stream_get_wrappers()) === FALSE) die("skip ftp wrapper not available.");
  6. if (!function_exists('pcntl_fork')) die("skip pcntl_fork() not available.");
  7. ?>
  8. --FILE--
  9. <?php
  10. require __DIR__ . "/../../../ftp/tests/server.inc";
  11. $path="ftp://localhost:" . $port."/";
  12. $ds=opendir($path);
  13. var_dump($ds);
  14. while ($fn=readdir($ds)) {
  15. var_dump($fn);
  16. }
  17. closedir($ds);
  18. ?>
  19. --EXPECTF--
  20. resource(%d) of type (stream)
  21. string(5) "file1"
  22. string(5) "file1"
  23. string(3) "fil"
  24. string(4) "b0rk"