-1
我想從php腳本連接數據庫。PHP連接到DB2
<?php
$database = '****';
$user = '*****';
$password = '******';
$hostname = '********';
$port = 50000;
$conn_string = "DRIVER={IBM DB2 ODBC DRIVER};DATABASE=$database;" .
"HOSTNAME=$hostname;PORT=$port;PROTOCOL=TCPIP;UID=$user;PWD=$password;";
$conn = db2_connect($conn_string, '', '');
if ($conn) {
echo "Connection succeeded.";
db2_close($conn);
}
else {
echo "Connection failed.";
}
?>
我geting下面的錯誤。
呼叫在/home/s1.php未定義功能db2_connect()上線10
有人能幫助我如何解決以下。