<?php require_once(“conf.php”); // youe database connection file $result = mysql_query( “SHOW TABLE STATUS” ); $dbsize = 0; while( $row = mysql_fetch_array( $result ) ) { $dbsize += $row[ "Data_length" ] + $row[ "Index_length" ]; } ?> <?php echo “<p>The size of the database is ” . formatfilesize( $dbsize ) . “</p>”; ?>
Filed under: Php | Tagged: databse size, get database size, mysql, Php | Leave a Comment »