Dbmier LED Artcraft Tracing Light Pad Light Box Light Board Light Table- A4

PHP Tech Blog

Dbmier LED Artcraft Tracing Light Pad Light Box Light Board Light Table- A4

留言簿(5)

Links

My Favorites

推荐技术文章

阅读排行榜

评论排行榜

php 得到所选择的mysql数据库名称和链接信息

<?php phpinfo();

$db_connection = mysql_connect("localhost","root","110");
mysql_select_db("szcpost",$db_connection) or die("Cannot open database test");


// 读取当前数据库名 www.szcpost.com
function mysql_current_db()
{
    $r = mysql_query("SELECT DATABASE()") or die(mysql_error());
    return mysql_result($r,0);
}

function get_host_info()
{
    return mysql_get_host_info();
}

function get_client_info()
{
    return mysql_get_client_info();
}

$db_name = mysql_current_db();
echo $db_name;
?>

posted on 2009-08-18 15:54 haix 阅读(1707) 评论(0)  编辑 收藏 引用 网摘 所属分类: MYSQL


只有注册用户登录后才能发表评论。
网站导航:
Dbmier LED Artcraft Tracing Light Pad Light Box Light Board Light Table- A4