如何配置 XAMPP 以与 MSSQL 一起使用? [英] How to configure XAMPP to use with MSSQL?

查看:28
本文介绍了如何配置 XAMPP 以与 MSSQL 一起使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将 XAMPP 配置为与 MSSQL 一起使用.我正在关注这个:Example 但我还是成功了.

I'm trying configure XAMPP to use with MSSQL. I'm following this: Example but I still had success.

我将文件: php_pdo_sqlsrv_54_ts.dllphp_sqlsrv_54_ts.dll 复制到文件夹 c:xamppphpext 并配置 >php.inic:xamppphpphp.ini 中.

I copied the files: php_pdo_sqlsrv_54_ts.dll and php_sqlsrv_54_ts.dll to folder c:xamppphpext and configured php.ini in c:xamppphpphp.ini.

php.ini 我激活了扩展:extension=php_pdo_sqlsrv_54_ts.dllextension=php_sqlsrv_54_ts.dll 并创建了 PDO 部分.<代码>[Pdo_sqlsrv]pdo_sqlsrv.log_severity=-1.

In php.ini I activated the extensions: extension=php_pdo_sqlsrv_54_ts.dll and extension=php_sqlsrv_54_ts.dll and created PDO section. [Pdo_sqlsrv] pdo_sqlsrv.log_severity=-1.

我正在使用 XAMPP v3.2.1 和 PHP 5.6.11

I am using XAMPP v3.2.1 and PHP 5.6.11

我怎样才能使它工作?

推荐答案

PHP5.6需要下载SQLSRV32.EXE,将 php_pdo_sqlsrv_56_ts.dll 和 php_sqlsrv_56_ts.dll 放到 ext 文件夹中,最后在 php.ini 上注册这些扩展,如下所示:

For PHP5.6 vou need download SQLSRV32.EXE, after it put the php_pdo_sqlsrv_56_ts.dll and php_sqlsrv_56_ts.dll on ext folder and finally register those extension on php.ini, like this:

extension=php_sqlsrv_56_ts.dll
extension=php_pdo_sqlsrv_56_ts.dll

重启 apache 并尝试 phpinfo() 或者你可以使用 getAvailableDrivers()

Restart apache and try phpinfo()or you could use getAvailableDrivers()

<?php
   echo "<pre>";
   print_r(PDO::getAvailableDrivers());

这篇关于如何配置 XAMPP 以与 MSSQL 一起使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆