Pseudo object-oriented mechanism of reading DIR. The given dir is open. Two properties available once Dir has been opened. The processing property can be used with other Dir functions such as Readdir (), Rewinddir () and Closedir ()
Dir-returns an instance of the Directory class,
Describe
Dir
Dir
string $ path;
Resources $ processing;
String changed to (invalid)
Invalid Rewind (invalid)
Invalid close (invalid)
)
Pseudo object-oriented mechanism of reading DIR. The given dir is open. Two properties available once Dir has been opened. The processing property can be used with other Dir functions, such as Readdir (), Rewinddir () and Closedir (). The Path property is set to the dir opening of the path. There are three ways: reading, rewind and close.
Instance
Example of # DIR ()
Please note the fashion, where Dir:: Read () The return value is checked in the following example. Whether we explicitly test the return value is the same (equivalent to the same type-see the comparison operator for more information) false, because otherwise, any Dir entry whose name evaluates to False will stop the loop.
$d = Dir ("/etc/php5");
echo "Handle:". $d->handle. "N";
echo "Path:". $d->path. "N";
while (false!== ($entry = $d->read ())) {
echo $entry. " n ";
}
$d->close ();
?>
http://www.bkjia.com/PHPjc/445491.html www.bkjia.com true http://www.bkjia.com/PHPjc/445491.html techarticle pseudo object-oriented mechanism of reading DIR. The given dir is open. Two properties available once Dir has been opened. The processing property can be used with other Dir functions, such as Readdir (), Rewinddir () ...