php列出mysql中可用数据库的名字
if (!function_exists('mysql_list_databases')) { function mysql_list_databases($resources = Array()) { $list = Array(); for ($i = 0; $i < count($resources); $i++) { $dbs = @mysql_list_dbs($resources[$i]); while ($row = @mysql_fetch_object($dbs)) { if ($row->Database != 'information_schema') { $list[] = $row->Database; } } } return $list; } }