Join Up!
104882 members and counting!

 
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links 
search for in the  
previouschrootclosedirnext
Last updated: Sun, 27 Oct 2002
view the printer friendly version or the printer friendly version with notes or change language to Finnish | German | Spanish

dir

(PHP 3, PHP 4 )

dir -- directory class

Popis

new dir ( string directory)

Pseudo-objektově orientovaný mechanismus pro čtení adresáře. Otevře zadaný directory. Po otevření adresáře jsou přístupné dvě vlastnosti. Vlastnost handle je použitelná s jinými adresářovými funkcemi jako readdir(), rewinddir() a closedir(). Hodnotou vlastnosti path je cesta k otevřenému adresáři. Dále jsou přístupné tři metody: read, rewind a close.

Příklad 1. dir() příklad

$d = dir("/etc");
echo "Handle: ".$d->handle."<br>\n";
echo "Path: ".$d->path."<br>\n";
while($entry=$d->read()) {
    echo $entry."<br>\n";
}
$d->close();

User Contributed Notes
dir
add a note about notes
There are no user contributed notes for this page.
previouschrootclosedirnext
Last updated: Sun, 27 Oct 2002
Copyright © 2001, 2002 The PHP Group
All rights reserved.
This mirror generously provided by: http://phpbuilder.com/
Last updated: Thu Oct 31 18:34:28 2002 EST