ben si t'as bien compris la fonction qu'il y a dessus, c'est tout bête !
function taille_rep ( $rep ) { $taille=0; $rep=opendir($rep); while ($file = readdir($rep)) { if($file != '..' && $file !='.' && $file !='') { if (is_dir($file)) $taille+=taille_rep($file); else $taille+=filesize($file); } } closedir($rep); return $taille;
}
|
et pour l'appeler :
$le_rep="nom_du_repertoire"; $taille=taille_rep($le_rep); echo "$le_rep occupe $taille octets !";
|
et voila !