当我将 apache(通过 xampp)作为独立服务器而不是作为服务运行时(在 Windows Server 2008 上)
使用以下连接代码一切正常(删除用户名和密码)
$server = "WMS";
$link = odbc_connect($server,'','');
if (!$link) {
die('Something went horribly wrong while connecting to MSSQL');
}else {echo('');}
但是,如果我将 apache 更改为在 Windows 中作为服务运行,则连接中断并且我收到以下错误消息
Warning: odbc_connect() [function.odbc-connect]: SQL error: [Microsoft][ODBC Driver Manager]
Data source name not found and no default driver specified, SQL state IM002 in SQLConnect in
C:\xampp\htdocs\Dev\well.php on line 30
Something went wrong while connecting to MSSQL