if ANY folder exists

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Post Reply
liquedus
php-forum Active User
php-forum Active User
Posts: 266
Joined: Tue Apr 08, 2003 5:18 am
Location: Ottawa, Canada
Contact:

Post by liquedus » Wed Jul 16, 2003 11:34 am

print "Folders in this directory:<br /><br />";
$dirObj = dir(getcwd());
while($f = $dirObj->read()){
if(is_dir($f)) print $f."<br />";
}

this will give you a listing of all folders in current directory :wink:

Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests