php列出mysql的所有数据库

清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>

<?php$conn = @mysql_connect( "localhost", "userName", "password" ) or die( "Sorry - could not connect to MySQL" );
$rs= @mysql_list_dbs( $conn ) or die( "Sorry - could not list databases" );for( $row=0; $row < mysql_num_rows($rs); $row++ ){
  $db_list .= mysql_tablename( $rs, $row ) . "<br />";  } ?><html> <head>
  <title>Listing databases</title>
 </head> <body>
  <h3>
   <?php echo( $db_list ); ?>
  </h3>
 </body></html>