从SQL 5.3开始,mssql_connect不再起作用 [英] mssql_connect no longer working as of PHP 5.3
问题描述
我刚从主机收到一封电子邮件,他们将我们的PHP升级到5.3,但是不幸的是,所有脚本现在都已损坏.我将其追溯到功能 mssql_connect 失败.支持人员告诉我,现在在5.3版中已弃用了-这怎么可能是真的?
I just received an email from our host and they've upgraded our PHP to 5.3, unfortunately though, all the scripts have now broken. I traced it down to the function mssql_connect failing. Support told me this has now been deprecated under 5.3 - how can this be true?
现在如何在PHP 5.3下连接到mssql数据库?
How can you connect to a mssql database under PHP 5.3 now??
推荐答案
http: //www.php.net/manual/en/intro.mssql.php
此扩展名在装有PHP 5.3或更高版本的Windows上不再可用."
"This extension is not available anymore on Windows with PHP 5.3 or later."
也许您应该考虑将您的应用转换为使用PDO: http://www.php.net/manual/en/ref.pdo -sqlsrv.php
Maybe you should look into converting your app to use PDO: http://www.php.net/manual/en/ref.pdo-sqlsrv.php
这篇关于从SQL 5.3开始,mssql_connect不再起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!