这是我到目前为止的代码。我已经检查了一百万次凭据,所以我知道它们是正确的。我不确定出了什么问题。有人可以帮我吗?提前致谢!
<?php
$database = "BLUDB";
$user = "xxx";
$password = "yyyy";
$hostname = "dashdb-entry-yp-dal09-07.services.dal.bluemix.net:8443";
$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.";
}
?>