dir command
| From: | Shane McBride | Date: | Wed, 16 Aug 2000 18:36:59 +0000 |
| Subject: | dir command | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-12089@lists.php.net to get a copy of this message | ||
Here is a code snippet that I got from the php manual (php.net).
I am confused about the "read" part of the command, mainly the "->" part.
What does this mean?
What is the handle? Is it necessary?
I want to list only *.html files. How can I do that?
What arguments go in the () in the read?
As you can see I am a newbie. I did do a search, but I couldn't find any
more specifics.
<?
$d = dir(".");
echo "Handle: ".$d->handle."<br>\n";
echo "Path: ".$d->path."<br>\n";
while($entry=$d->read()) {
echo $entry."<br>\n";
}
$d->close();
?>