<?$dir = (".");$f_size = 0;size ($dir);echo $f_size;//---------------------------------------function size ($dir) { global $f_size; $dh = opendir ($dir); while ($file = readdir($dh)) { if($file!="." && $file!="..") { $fullpath = $dir."/".$file; if(!is_dir ($fullpath)) { $f_size = $f_size + filesize ($fullpath); } else { size ($fullpath); } } } closedir ($dh); return ($f_size); }?>