-
-
Save j0k3r/594166 to your computer and use it in GitHub Desktop.
mysqlinfo - A phpinfo() like for mysql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | |
<html> | |
<head> | |
<style type="text/css"> | |
a { text-decoration: none; } | |
a:hover { text-decoration: underline; } | |
h1 { font-family: arial, helvetica, sans-serif; font-size: 18pt; font-weight: bold;} | |
h2 { font-family: arial, helvetica, sans-serif; font-size: 14pt; font-weight: bold;} | |
body, td { font-family: arial, helvetica, sans-serif; font-size: 10pt; } | |
th { font-family: arial, helvetica, sans-serif; font-size: 11pt; font-weight: bold; } | |
</style> | |
<title>mysqlinfo()</title> | |
</head> | |
<body> | |
<?php | |
mysql_connect("localhost","root",""); | |
$query = mysql_query("show variables"); | |
?> | |
<br> | |
<table cellpadding="3" cellspacing="0" width="600" align="center" style="border-collapse: collapse;border: 1px solid #000000">"; | |
<tr bgcolor="#9999cc"> | |
<td> | |
<b><font style="font-size: 20px">MySQL Version <?php echo mysql_get_server_info() ?></font></b> | |
</td> | |
<td align="right"><a href="http://mysql.com" target="_blank"><img src="http://mysql.com/common/logos/logo-mysql-110x57.png" border="0"></a></td> | |
</tr> | |
</table> | |
<br> | |
<table cellpadding="3" cellspacing="0" width="600" align="center" bgcolor="ccc8fa" style="border-collapse: collapse; border: 1px solid #000000"> | |
<?php | |
while ($row=mysql_fetch_array($query)) | |
{ | |
echo "<tr><td style=\"border: 1px solid #000000\" bgcolor=#ccccff><b>"; | |
echo $row[0]; | |
echo "</b></td><td style=\"border: 1px solid #000000\" bgcolor=#cccccc>"; | |
echo $row[1]; | |
echo "</td></tr>"; | |
} | |
?> | |
</table> | |
<br> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment