summaryrefslogtreecommitdiff
path: root/ext/standard/tests/streams/opendir-002.phpt
blob: a9959799925b592c5556abd1d12bfc3eac9329fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
--TEST--
opendir() with 'ftp://' stream.
--SKIPIF--
<?php
if (array_search('ftp',stream_get_wrappers()) === FALSE) die("skip ftp wrapper not available.");
if (!function_exists('pcntl_fork')) die("skip pcntl_fork() not available.");
?>
--FILE--
<?php

require __DIR__ . "/../../../ftp/tests/server.inc";

$path="ftp://localhost:" . $port."/";

$ds=opendir($path);
var_dump($ds);

while ($fn=readdir($ds)) {
      var_dump($fn);
}

closedir($ds);
?>
==DONE==
--EXPECTF--
resource(%d) of type (stream)
string(5) "file1"
string(5) "file1"
string(3) "fil"
string(4) "b0rk"
==DONE==