sí, pero nada. al final he conseguido obtenerlo con otras dos funciones: la primera, me lee el directorio y me dice el tamaño, y con la segunda, transformo los bytes en MB, GB...
las funciones que hago son:
Código PHP:
function dirsize($path,$buf=2){
static $buffer;
if(isset($buffer[$path]))
return $buffer[$path];
if(is_file($path))
return filesize($path);
if($dh=opendir($path)){
$size=0;
while(($file=readdir($dh))!==false){
if($file=='.' || $file=='..')
continue;
$size+=dirsize($path.'/'.$file,$buf-1);
}
closedir($dh);
if($buf>0)
$buffer[$path]=$size;
return $size;
}
return false;
}
la segunda funcion
Código PHP:
function humansize ($bytes){
$position = 0;
$units = array(" bytes", " Kb", " Mb", " Gb", " Tb" );
while( $bytes >= 1024 && ( $bytes / 1024 ) >= 1 ) {
$bytes /= 1024;
$position++;
}
return round ($bytes, 1) . $units[$position];
}
y luego,
Código PHP:
while ($row=mysql_fetch_array($cnx))
{
$nombre = "".$row['nombre']."";
$apellidos = "".$row['apellidos']."";
$email = "".$row['email']."";
$path = "modulos/$nombre";
$tamano = humansize (dirsize ("$path"));
echo ("".$apellidos.", ".$nombre." -".$email."-".$tamano);
}
y por fin funciona....
gracias por todo, Fridureiks. un 10 en atención y preocupación por mi problema...