function sitemap($ddPath)
{       $dhandle = opendir($ddPath);
        echo("<ul>");
        while ($ddFile = readdir($dhandle))
        {       if ($ddFile == "." or $ddFile == "..") continue; // trap .
and ..
                echo("<li>".$ddFile . "</li>");
                if (is_dir($ddPath . $ddFile)) sitemap($ddPath . $ddFile .
"/");
        };
        closedir($dhandle);
        echo("</ul>");
};

just call it by passing in the path to the directory you want to list and
it'll give you a full listing below that point

        Tim Ward
        Senior Systems Engineer

Please refer to the following disclaimer in respect of this message:
http://www.stivesdirect.com/e-mail-disclaimer.html


> -----Original Message-----
> From: Augusto Cesar Castoldi [mailto:[EMAIL PROTECTED]]
> Sent: 09 April 2001 17:06
> To: [EMAIL PROTECTED]
> Subject: list files in a diretory
> 
> 
> How can I list the files in a diretory?
> 
> Something like, get the files name in an array...
> 
> thanks,
> 
> Augusto Cesar Castoldi
> 
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to