Re: Disk Quota

From: Date: Fri, 04 Aug 2000 07:00:33 +0000
Subject: Re: Disk Quota
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-10079@lists.php.net to get a copy of this message
Hi Tomas, That is what I am looking for, Thank you so much. Mark ----- Original Message ----- From: Thomas Deliduka <thomas@neweve.com> To: PHP List <php-general@lists.php.net> Sent: Thursday, August 03, 2000 10:09 PM Subject: Re: [PHP] Disk Quota > On 8/3/00 9:49 AM this was written: > > > I would like to know how to display disk quota information on the Web (using > > PHP), so that my client can always check their quota limit via the web. > > I just did this. I have a control panel I'm working on that tells a user how > much space he's taking up in a directory. This may not be efficient but it's > what I do. > > $home = "/home/user"; // this is actually taken from a database record > $cmd = "/sbin/du -hs $home"; > exec($cmd,$ex); > echo substr($ex[0], 0, strpos($ex[0],"/")-1); > > This will display the value in like 26.5M or something like that. > > If you want to subtract the MB from what their limit is you can strip off > the M and do the subtraction. > > But, if htey have less than a MB in the directory it will show up as 300K so > you have to do a check for K or M to do the subtraction. > -- > > Thomas Deliduka > IT Manager > ------------------------- > New Eve Media > The Solution To Your Internet Angst > http://www.neweve.com/ > > > > -- > 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 >

« previous php.general (#10079) next »