<?PHP function diskUsage( $dir ) { if ( is_file ( $dir ) ) return filesize( $dir ); if( strlen( $dir ) - 1 != '\\' || strlen( $dir ) - 1 != '/' ) $dir .= '/'; $handle = @opendir( $dir ); if( !$handle ) return false; while ( ( $file = readdir( $handle ) ) !== false ) { if( $file != '.' && $file != '..' ) { $use += diskUsage( $dir.$file ); } } closedir( $handle ); return $use; } ?>
<?PHP echo 'Speicherbelegung: ' . diskUsage("c:\\Temp") . ' Bytes'; ?>