size of a directory? I know how you can tell how many files are IN a directory... you can also check how much space is left in the directory by doing this: diskfreespace("/dir");
but for all the files in the directory you could do this
$amount = 0;
if ($handle = opendir('.')) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {
$amount++;
}
}
closedir($handle);
}
echo $amount;
That should echo the number of files in the directory specified.