从 WAMPSERVER 2.5 连接到 SQL 服务器上的数据库
Connecting to database on SQL server from WAMPSERVER 2.5
我有一个 WAMPSERVER 2.5 开发服务器。是 运行 PHP 5.512.
我正在尝试连接到我们的实时 SQL 服务器。我已经安装并激活了版本 32 files,并使用了以下代码:
<?php
$link = sqlsrv_connect('obscured_ip:obscured_port', array('Database'=>'obscured_database','UID'=>'obscured_uid', 'PWD'=>'obscured pwd'));
if (!$link)
die(print_r(sqlsrv_errors(), true));
?>
我收到以下错误:
Array ( [0] => Array ( [0] => IMSSP [SQLSTATE] => IMSSP 1 => -49 [code] => -49 2 => This extension requires the Microsoft ODBC Driver 11 for SQL Server. Access the following URL to download the ODBC Driver 11 for SQL Server for x86: http://go.microsoft.com/fwlink/?LinkId=163712 [message] => This extension requires the Microsoft ODBC Driver 11 for SQL Server. Access the following URL to download the ODBC Driver 11 for SQL Server for x86: http://go.microsoft.com/fwlink/?LinkId=163712 ) 1 => Array ( [0] => IM002 [SQLSTATE] => IM002 1 => 0 [code] => 0 2 => [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified [message] => [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified ) )
那里指定的 link 只是让我回到驱动程序下载页面。我做错了什么?
错误中的URL指向了错误的页面。这是正确的:https://www.microsoft.com/en-us/download/details.aspx?id=36434
我有一个 WAMPSERVER 2.5 开发服务器。是 运行 PHP 5.512.
我正在尝试连接到我们的实时 SQL 服务器。我已经安装并激活了版本 32 files,并使用了以下代码:
<?php
$link = sqlsrv_connect('obscured_ip:obscured_port', array('Database'=>'obscured_database','UID'=>'obscured_uid', 'PWD'=>'obscured pwd'));
if (!$link)
die(print_r(sqlsrv_errors(), true));
?>
我收到以下错误:
Array ( [0] => Array ( [0] => IMSSP [SQLSTATE] => IMSSP 1 => -49 [code] => -49 2 => This extension requires the Microsoft ODBC Driver 11 for SQL Server. Access the following URL to download the ODBC Driver 11 for SQL Server for x86: http://go.microsoft.com/fwlink/?LinkId=163712 [message] => This extension requires the Microsoft ODBC Driver 11 for SQL Server. Access the following URL to download the ODBC Driver 11 for SQL Server for x86: http://go.microsoft.com/fwlink/?LinkId=163712 ) 1 => Array ( [0] => IM002 [SQLSTATE] => IM002 1 => 0 [code] => 0 2 => [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified [message] => [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified ) )
那里指定的 link 只是让我回到驱动程序下载页面。我做错了什么?
错误中的URL指向了错误的页面。这是正确的:https://www.microsoft.com/en-us/download/details.aspx?id=36434