PHP中的mssql_connect不存在 [英] mssql_connect in PHP does not exist
问题描述
我一直在努力与这一段时间,现在,我不知道我失踪了。错误是:
I've been struggling with this for a while now and I don't know what I'm missing. The error is:
call to undefined function mssql_connect()
已经研究过了,我已经尽了一切。
Having looked into it already, I've done about everything I can.
- 我将
php.ini
文件移动到了c:\windows
-
在ini中,我将
extension_dir
指令更改为c:PHP\ext
并取消注释: p>
- I moved the
php.ini
file toc:\windows
In the ini I changed the
extension_dir
directive toc:PHP\ext
and uncommented:
extension = php_mssql.dll
c:windows \system32 \
c:\windows \system32
PHP仍然无法识别函数和库类。我被困住了,我做不对,会爱上一些帮助。如果有帮助,我将运行PHP 5.3.2,IIS和Microsoft SQL Server 2008.
PHP is still not recognizing the function and library classes. I'm stumped as to what I didn't do right and would love some help. If it's helpful, I'm running PHP 5.3.2, IIS, and Microsoft SQL Server 2008.
推荐答案
对于SQL Server 2008在Windows上 sqlsrv_connect
这是因为Microsoft现在使用 SQL驱动程序PHP 现在是2.0版本我相信。
For SQL Server 2008 on Windows it's sqlsrv_connect
This is because Microsoft now uses the SQL Driver for PHP which is now on version 2.0 I believe.
此外,值得注意的是,使用sqlsrv_query和mssql_query他们切换了参数(花了半小时才算出来)。
Also it's worth noting that with sqlsrv_query, and mssql_query they switched the parameters around (spent half an hour figuring that out).
这篇关于PHP中的mssql_connect不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!