Просмотр поста

.
AlezZ

Держи.

function getDirSize($path)
{ if(is_file($path)) return filesize($pash);
$size = 0;
$dh = opendir($path);
while(($file = readdir($dh))!==false)
{ if($file == '.' || $file == '..')
continue;
if(is_file($path.'/'.$file))
$size+=filesize($path.'/'.$file);
} closedir($dh);
return formatsize($size+filesize($path));
}