1、https://www.microsoft.com/en-us/download/details.aspx?id=20098
下载好后,解压到随便一个目录里,然后找到对应版本的扩展的两个文件,复制到PHP的EXT目录下面
然后在php.ini加上extension扩展两个,比如
extension=php_sqlsrv_55_ts.dll
extension=php_pdo_sqlsrv_55_ts.dll
2 再需要装ODBC(不然还是连不上,大坑一个)
https://www.microsoft.com/zh-cn/download/details.aspx?id=36434
驱动文件 msodbcsql.msi
3 vc++2012运行库(不然还是连不上,大坑一个)
Visual C++ Redistributable for Visual Studio 2012 Update 4(x64)下载地址(安装PHP需要此插件):
Visual C++ Redistributable for Visual Studio 2012 Update 4(x86)下载地址(安装PHP需要此插件):
库文件名称
vcredist_x64