lo spazio occupato si, quello disponibile (come da titolo) no

basta che ti fai un ciclo di tutte le cartelle e leggi la dimensione del tutto


codice:
<?php

function GetDirectorySize($startingPath)
{
  $directoryList = array($startingPath);
  $returnValue = 0;
  
  while(list(, $selectedPath) = each($directoryList))
  {
    $subPaths = glob($selectedPath . '/*');
    
    if ($subPaths == false)
    {
      continue;
    }
    
    while(list(, $subPath) = each($subPaths))
    {
      if (is_dir($subPath) == true)
      {
        $directoryList[] = $subPath;
      }
      else
      {
        $returnValue += filesize($subPath);
      }
    }
  }
  
  return $returnValue;
}

echo (GetDirectorySize('/web') / 1024) ;

?>