$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));
}
,這是給我這個錯誤:SQL連接通過PHP
Fatal error: Call to undefined function sqlsrv_connect() On LINE 23
我想知道我應該改變,以建立連接。
有沒有23行嗎? –
@rowlandshaw我複製了這部分的其餘部分被評論代碼 –