Created
September 23, 2010 11:47
-
-
Save pborreli/593499 to your computer and use it in GitHub Desktop.
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
<?php | |
mysql_connect('localhost', 'root', '') or | |
die('cannot connect : ' . mysql_error()); | |
?> | |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | |
<html> | |
<head> | |
<style type="text/css"> | |
body { font-family: arial, helvetica, sans-serif; font-size: 10pt; margin: 0; } | |
table { border-collapse: collapse; margin: auto; } | |
tr { background-color: #99c } | |
td { border: 1px solid #000; background-color: #ccc; } | |
.key { background-color: #ccf } | |
</style> | |
<title>mysqlinfo()</title></head> | |
<body> | |
<table> | |
<?php | |
$result = mysql_query('SHOW VARIABLES'); | |
while ($row = mysql_fetch_array($result, MYSQL_NUM)) :?> | |
<tr><td class="key"><?php echo $row[0] ?></td><td><?php echo $row[1] ?></td></tr> | |
<?php endwhile; ?> | |
</table> | |
<?php mysql_free_result($result); ?> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment