PHP/File Directory/disk total space
Версия от 10:37, 26 мая 2010; (обсуждение)
disk_total_space.php
<?php
$systempartitions = array("/", "/home","/usr", "/www");
foreach ($systempartitions as $partition) {
$totalSpace = disk_total_space($partition) / 1048576;
$usedSpace = $totalSpace - disk_free_space($partition) / 1048576;
echo "Partition: $partition (Allocated: $totalSpace MB. Used: $usedSpace MB.)";
}
?>