faqts : Computers : Programming : Languages : PHP : Common Problems : Files

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

6 of 12 people (50%) answered Yes
Recently 4 of 10 people (40%) answered Yes

Entry

Echoing current directory

Mar 23rd, 2001 13:11
Ben Udall, Jeffrey Wilhelm, http://www.php.net/manual/en/class.dir.php


$dir_obj = dir('.');
while ($item_name = $dir_obj->read())
   echo htmlentities($item_name)."<br />\n";
$dir_obj->close();