dragon2025
2014-09-14 12:09 阅读 52
已采纳

在PHP5.6上使用MS SQL SERVER

So I have a trouble here. Tried use mssql_connect() but interpeter says that function is undefinied. PHP.net advices this, but it suppports only older versions of PHP. Is it possible to connect to MS SQL Server database from PHP5.6? What extensions should I add, what functions can I use?

Configuration details: localhost, Apache 2.4, PHP 5.6, OS Windows 8.

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

2条回答 默认 最新

  • 已采纳
    dsb12300 dsb12300 2014-09-14 12:13

    You need to enable the MSSQL extension in the PHP.ini file.

    If this extension is not installed, you need to install it in PHP.

    Please tell your server details (OS/WebServer like apache nginx) so that I can explain in detail.

    点赞 评论 复制链接分享
  • doupingyun73833 doupingyun73833 2014-09-14 12:28

    Use

     <?php phpinfo();?>
    

    to see what are available with your php installation. I advice you to use PDO instead of mysql_* functions. It supports several databases not only MSSQL or MySQL.

    点赞 评论 复制链接分享

相关推荐