Re: calculating kilobytes

From: Date: Sat, 15 Feb 2003 14:05:43 +0000
Subject: Re: calculating kilobytes
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-135662@lists.php.net to get a copy of this message
Hi, Saturday, February 15, 2003, 5:17:59 AM, you wrote: j> hi j> first of all i think this is a great community here :) j> now to the point... j> i need a script. it should work on safe mode php so it should be as simple j> as possible. j> it should calculate all the file sizes in the directory that it is in and in j> the subdirectories also (only 1 level subdirectories). it should echo the j> total size of the uploaded files. j> then it should take the filesize and substract it from 25 megabytes. that is j> the limit on this server. then it should echo the result (the maximum number j> of kilobytes that can still fit on this account). j> unfortunately i have insuffitient knowlege to do it miself. j> i just want to thank anyone who can help me. j> if you want to send it to my email then its liberache@hot.ee . or you can j> just write it here. j> thank you :) These commands might help if they work with safe mode and your on unix of some sort echo exec("du -c -h /home/tigger",$results).'<br>'; echo exec("du -c /home/tigger",$results).'<br>'; -- regards, Tom

« previous php.general (#135662) next »