Jump to content

[SOLVED] Listing Folders in a Directory


pugboy

Recommended Posts

$handler = opendir($directory);

 

// keep going until all files in directory have been read

while ($file = readdir($handler)) {

    if(is_dir($file)) {

            ... do your stuff

    }

}

 

EDIT:  YesI got that of google: "php, list directory files" - and of php.net documentation on files - ctrl + f "dir"........ check out the documentation there theres a large list of functiosn tha will help you.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.