you probably meant $totalfilesize += filesize($files);
^
At 13:17 12.1. 2001, Johan Holst Nielsen wrote the following:
--------------------------------------------------------------
>>Is there a way in PHP to get the size of a directory? (so I can see how much disk
>space my >users are using in their home directory).
>
>>Can someone also tell me what the PHP General list is exactly. Is it run by PHP folk
>only? Can >I subscribe to this list somewhere and maybe help someone else out for a
>change?
>
>Yes! Try to see this, it isn't tested, just maked out of memory!
>
><?
>$totalfilesize = 0;
>$dir=opendir('.');
>while (($files = readdir($dir))!==false) {
> $totalfilesize .= filesize($files);
>}
>closedir($dir);
>print($totalfilesize." bytes");
>?>
>
>
>
>
>
>
>--
>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]
------end of quote------
____________________________________________________________
Cynic:
A member of a group of ancient Greek philosophers who taught
that virtue constitutes happiness and that self control is
the essential part of virtue.
[EMAIL PROTECTED]
--
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]