我的phpmyadmin有這些數據庫,看起來像這樣:名單MySQL數據庫的PHP
demo_db_1
information_schema
mysql
performance_schema
demo_db_2
test_db_1
test_db_2
我怎樣才能得到所有自定義數據庫的列表?
含義:當我運行一個文件test.php的,我想看看像
demo_db_1
demo_db_1
test_db_1
test_db_2
名單,我不想連接到任何數據庫。只需要所有創建的數據庫的列表。我怎樣才能做到這一點?
在此先感謝
看看這個http://php.net/manual/en/function.mysql-list-dbs.php – 2013-03-05 07:44:46