$db_server = "localhost";
$db_user = "atyu30";
$db_pass = "atyu30";
$db_sid = "atyu30";
$dbconn=OCILogon($db_user,$db_pass,"(DEscriptION=(ADDRESS=(PROTOCOL =TCP)(HOST=127.0.0.1)(PORT = 1521))(CONNECT_DATA =(SID=$db_sid)))");
if($dbconn!=false)
{
echo "连接";
echo "DB服务器:".$db_server;
echo "用户:".$db_user;
echo "口令:".$db_pass;
echo "SID:".$db_sid;
echo "成功\n";
if(OCILogOff($dbconn)==true)
{
echo "关闭连接成功!";
}
}
else
{
echo "连接失败";
}
?>
阅读(2222) | 评论(0) | 转发(0) |