你在php.ini中的extensions里装住了php_mssql.dll库了吗?
php不能直接访问mssql的,你在php.ini中找到"Windows Extensions",在下面找到 
“;extension=php_mssql.dll”,去掉前面的分号,还要注意你的extension_dir = c:\php\extensions 这一项,是你扩展库的文件存放路径,修改了php.ini后,重新启动IIS

解决方案 »

  1.   

    extension=php_mssql.dll前面的分号我已去掉了,也重启了IIS,但是extension_dir  =  c:\php\extensions  我的php.ini中写的是extension_dir = "C:\PHP\php-4.3.2-Win32\extensions",我没有改动,我是新学的php,这个扩展库不知是指什么,放在哪里,现在浏览时还是什么也没有,请指教,谢谢!
      

  2.   

    在你的C:\PHP\php-4.3.2-Win32\下面应该有一个extensions目录,那些文件都在这里面,你应该把这下面的dll文件都拷贝到你的systemroot目录下,也就system32目录下
      

  3.   

    我把那些dll文件都拷到system32下了,当我用别的文件去调用它时,出现如下错误,好像是不支持,请问如何能改呢,还是不能用mssql呢?
    Warning: dl(): Not supported in multithreaded Web servers - use extension statements in your php.ini in C:\Inetpub\wwwroot\ab.php on line 6Warning: mssql_connect(): Unable to connect to server: localhost in C:\Inetpub\wwwroot\ab.php on line 7Warning: mssql_select_db(): message: Login failed for user 'CARY\IUSR_LIWEI'. (severity 14) in C:\Inetpub\wwwroot\ab.php on line 8Warning: mssql_select_db(): Unable to connect to server: (null) in C:\Inetpub\wwwroot\ab.php on line 8Warning: mssql_select_db(): A link to the server could not be established in C:\Inetpub\wwwroot\ab.php on line 8Warning: mssql_query(): supplied argument is not a valid MS SQL-Link resource in C:\Inetpub\wwwroot\ab.php on line 10Warning: mssql_result(): supplied argument is not a valid MS SQL-result resource in C:\Inetpub\wwwroot\ab.php on line 11Warning: mssql_query(): supplied argument is not a valid MS SQL-Link resource in C:\Inetpub\wwwroot\ab.php on line 13Warning: mssql_close(): supplied argument is not a valid MS SQL-Link resource in C:\Inetpub\wwwroot\ab.php on line 14
    1
      

  4.   

    我把那些dll文件都拷到system32下了,当我用别的文件去调用它时,出现如下错误,好像是不支持,请问如何能改呢,还是不能用mssql呢?
    Warning: dl(): Not supported in multithreaded Web servers - use extension statements in your php.ini in C:\Inetpub\wwwroot\ab.php on line 6Warning: mssql_connect(): Unable to connect to server: localhost in C:\Inetpub\wwwroot\ab.php on line 7Warning: mssql_select_db(): message: Login failed for user 'CARY\IUSR_LIWEI'. (severity 14) in C:\Inetpub\wwwroot\ab.php on line 8Warning: mssql_select_db(): Unable to connect to server: (null) in C:\Inetpub\wwwroot\ab.php on line 8Warning: mssql_select_db(): A link to the server could not be established in C:\Inetpub\wwwroot\ab.php on line 8Warning: mssql_query(): supplied argument is not a valid MS SQL-Link resource in C:\Inetpub\wwwroot\ab.php on line 10Warning: mssql_result(): supplied argument is not a valid MS SQL-result resource in C:\Inetpub\wwwroot\ab.php on line 11Warning: mssql_query(): supplied argument is not a valid MS SQL-Link resource in C:\Inetpub\wwwroot\ab.php on line 13Warning: mssql_close(): supplied argument is not a valid MS SQL-Link resource in C:\Inetpub\wwwroot\ab.php on line 14
    1
      

  5.   

    我把那些dll文件都拷到system32下了,当我用别的文件去调用它时,出现如下错误,好像是不支持,请问如何能改呢,还是不能用mssql呢?
    Warning: dl(): Not supported in multithreaded Web servers - use extension statements in your php.ini in C:\Inetpub\wwwroot\ab.php on line 6Warning: mssql_connect(): Unable to connect to server: localhost in C:\Inetpub\wwwroot\ab.php on line 7Warning: mssql_select_db(): message: Login failed for user 'CARY\IUSR_LIWEI'. (severity 14) in C:\Inetpub\wwwroot\ab.php on line 8Warning: mssql_select_db(): Unable to connect to server: (null) in C:\Inetpub\wwwroot\ab.php on line 8Warning: mssql_select_db(): A link to the server could not be established in C:\Inetpub\wwwroot\ab.php on line 8Warning: mssql_query(): supplied argument is not a valid MS SQL-Link resource in C:\Inetpub\wwwroot\ab.php on line 10Warning: mssql_result(): supplied argument is not a valid MS SQL-result resource in C:\Inetpub\wwwroot\ab.php on line 11Warning: mssql_query(): supplied argument is not a valid MS SQL-Link resource in C:\Inetpub\wwwroot\ab.php on line 13Warning: mssql_close(): supplied argument is not a valid MS SQL-Link resource in C:\Inetpub\wwwroot\ab.php on line 14
    1