Re: Question

From: Date: Fri, 12 Jan 2001 12:21:55 +0000
Subject: Re: Question
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-34238@lists.php.net to get a copy of this message
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: php-general-unsubscribe@lists.php.net >For additional commands, e-mail: php-general-help@lists.php.net >To contact the list administrators, e-mail: php-list-admin@lists.php.net ------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. cynic@mail.cz

« previous php.general (#34238) next »