$result = mysql_query("show databases");
$test = mysql_fetch_array($result);
if (in_array('db20061120',$test)){
.....
}
$test = mysql_fetch_array($result);
if (in_array('db20061120',$test)){
.....
}
if(mysql_num_rows($rs) == 0) {
echo "$dbName 不存在";
}或mysq_select_db($dbName) or die("$dbName 不存在");