我想用PHP连接到sql server数据库.
我安装了xampp 1.7.0(php 5.2)和SQLSRV20.我添加了扩展程序php.ini,我收到此错误:
Warning: mssql_connect() [function.mssql-connect]: Unable to connect to
server: 10.85.80.229 in C:\xampp\htdocs\xampp\test.php on line 07
Run Code Online (Sandbox Code Playgroud)
码:
<?php
$myServer = "10.85.80.229";
$myUser = "root";
$myPass = "pass";
$myDB = "testdb";
$dbhandle = mssql_connect($myServer, $myUser, $myPass)
or die("Couldn't connect to SQL Server on $myServer");
?>
Run Code Online (Sandbox Code Playgroud)
此错误消息的含义是什么以及如何连接到SQL Server?