Enviroment: File Management System
Programming Languages: PHP, HTML
My problem is that I have a File Management system thats working okay but when it comes to detecting the size of a folder where a clients information is I'm haveing a problem.
Each client has a folder(there username) under a main hosting folder.
../hosting/$username/
I have a script that detects the number of Bytes I think it is in a folder but what I want is to change that into megabytes. Also. Will this script count the number of bytes in other folders in the main $username folder?
Code: Select all
<?php
$select = mysql_fetch_array(mysql_query("SELECT * FROM clients WHERE username='$username' LIMIT 1"));
$dir = "C:/AppServ/www/hosting/$username/";
$megabyte = '1048576';
$ds = disk_total_space($dir);
$su = round($ds/$megabyte);
?>http://www.webdummy.net/serverpro/login.php
Under the space: heading the first set of numbers is $ds and the one under that is $megabyte
Where it says: 108771 / 100 that should be megabytes / 100