update page now

Voting

: min(nine, one)?
(Example: nine)

The Note You're Voting On

hotrungdungit at gmail dot com
17 years ago
Below will return an array of file names and folders in directory

<?php
function ReadFolderDirectory($dir = "root_dir/here")
    {
        $listDir = array();
        if($handler = opendir($dir)) {
            while (($sub = readdir($handler)) !== FALSE) {
                if ($sub != "." && $sub != ".." && $sub != "Thumb.db") {
                    if(is_file($dir."/".$sub)) {
                        $listDir[] = $sub;
                    }elseif(is_dir($dir."/".$sub)){
                        $listDir[$sub] = $this->ReadFolderDirectory($dir."/".$sub); 
                    }
                }
            }    
            closedir($handler);
        }
        return $listDir;    
    }
?>

<< Back to user notes page

To Top