【发布时间】:2013-07-18 20:14:53
【问题描述】:
$serverName = "172.20.90.100";
// Since UID and PWD are not specified in the $connectionInfo array,
// The connection will be attempted using Windows Authentication.
$connectionInfo = array( "Database"=>"correctdb");
$conn = sqlsrv_connect( $serverName, $connectionInfo);
if( $conn ) {
echo "Connection established.<br />";
}else{
echo "Connection could not be established.<br />";
die( print_r( sqlsrv_errors(), true));
}
这给了我这个错误:
致命错误:在第 23 行调用未定义函数 sqlsrv_connect()
我想知道我应该改变什么来建立连接。
【问题讨论】:
-
那里不是23行吗?
-
@rowlandshaw 我把这部分复制出来,另一部分是注释代码
标签: php sql connection