php3-list | 199908
Date: 08/16/99
- Next message: henning.sprang <email protected>: "[PHP3] Antwort: [PHP3] PHPLIB"
- Previous message: Soren Staun-Pedersen: "Re: [PHP3] Re: PDF functionality"
- Maybe in reply to: Dev Young: "[PHP3] getting all files in a directory"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
function ShowDirectory($directory) {
if(!isset($ret)) $ret = '';
$dirhandle = opendir($directory);
while ( $entity = readdir($dirhandle)) {
if ($entity[0] == '.') {
// Do nutting
} elseif ( is_dir($directory . '/' . $entity)) {
ShowDirectory($directory . '/' . $entity);
} else {
echo $directory . '/' . $entity . '=' . filesize($directory . '/'
. $entity) . '<br>';
}
}
}
Should work with some tweaking i guess.
//Robert
Citerar Dev Young <devon <email protected>>:
>
> I'm trying to write a script that can get all the files in a directory
&
> basically show their names & sizes, on a web page. Any ideas or
> suggestions on how to do this? I've been looking through the
filesystem
> functions...and can't figure out just what might work for this
>
> - Dev
>
>
> --
> PHP 3 Mailing List <http://www.php.net/>
> To unsubscribe, send an empty message to
php3-unsubscribe <email protected>
> To subscribe to the digest, e-mail:
php3-digest-subscribe <email protected>
> To search the mailing list archive, go to:
> http://www.php.net/mailsearch.php3
> To contact the list administrators, e-mail:
php-list-admin <email protected>
>
>
"Very funny, Scotty. Now beam down my clothes."
-- PHP 3 Mailing List <http://www.php.net/> To unsubscribe, send an empty message to php3-unsubscribe <email protected> To subscribe to the digest, e-mail: php3-digest-subscribe <email protected> To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: henning.sprang <email protected>: "[PHP3] Antwort: [PHP3] PHPLIB"
- Previous message: Soren Staun-Pedersen: "Re: [PHP3] Re: PDF functionality"
- Maybe in reply to: Dev Young: "[PHP3] getting all files in a directory"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

