我的WAMP服务器安装在我的系统中。 我也在同一个系统上安装了MS SQL Server 2008。php-mssql服务器数据库连接使用wamp服务器
我想使我的php应用程序与MS SQL Server的连接。 我已经在我的config.php文件中尝试了下面的代码段以获得数据库的一致性。
<?php
$conn=mssql_connect('localhost','DINKDEV2\Administrator','[email protected]') or die('not connect');
mssql_select_db('nevis_pharma_company');
if($conn) {
echo "Connection established.<br />";
}else{
echo "Connection could not be established.<br />";
die(print_r(sqlsrv_errors(), true));
}
?>
你甚至检查文档? http://www.php.net/manual/en/function.sqlsrv-connect.php – jycr753