Ver Mensaje Individual
  #2 (permalink)  
Antiguo 02/08/2004, 12:29
Cluster
O_O
 
Fecha de Ingreso: enero-2002
Ubicación: Santiago - Chile
Mensajes: 34.417
Antigüedad: 22 años, 4 meses
Puntos: 129
En teoría debería mostrar bien ese valor (tal vez te falte el / final de la ruta para indicar directorio . .pruebalo)

A "malas" podrías hacer algo como lo que se propone aquí:

Cita:
nospam at jusunlee dot com (30-Jul-2003 02:45)

The above is only useful if you need to find the total used space of a mountpoint. If you are looking for a script that determines the total used space of a directory and all of its contents (including subdirectories), heres a recursive function that should do the work.
<?
$total = 0;
function spaceUsed($dir) {
if (is_dir($dir)) {
if ($dh = opendir($dir)) {
while (($file = readdir($dh)) !== false) {
if (is_dir($dir.$file) && $file != '.' && $file != '..') {
spaceUsed($dir.$file.'/');
} else {
$GLOBALS['total'] += filesize($dir.$file);
}
}
closedir($dh);
}
}
}
spaceUsed('/path/to/directory/');
$total /= 1048576;
echo round($total, 1).' mb';
?>
Un saludo,