Home >php教程 >php手册 >Warning: mssql_connect() [function.mssql-connect]:

Warning: mssql_connect() [function.mssql-connect]:

WBOY
WBOYOriginal
2016-05-25 16:53:10883browse

错误提示:warning: mssql_connect() [function.mssql-connect]: unable to connect to server: $sa in d:php2.php on line 11 error

下面来看一下解决方法吧,系统是: win2003+mssql2000+php5.23

实现方法:php目录下有没有ntwdblib.dll有没有这个文件?ntwdblib.dll是客户连接库,如果有查看一下版本号是多少,一般会是7.0的,这个只能与mssq 7.0进行连接,我们为了能与我们现数据库教程版本相同就把mssql下的ntwdblib.dll拷贝到你php 所在的目录替换那个7.0的,重起iis就ok了

插曲,如果你的mssql连接有问题可利用php自带了函数 mssql_get_last_message(),来取得错误信息。

本文地址:

转载随意,但请附上文章地址:-)

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn