directory i read edip, while a baglayıp tek tek size ları + ederek bulabilirsin

$path = "/home/haymac/www";
$dh = opendir($path);
$i=0;
clearstatcache();
while (($file = readdir($dh)) !== false) {
if($file != "." && $file != "..") {
$i = $i+filesize("$path/$file");
}
}
closedir($dh);
echo "Toplam boyut $i";