How to use PHP to connect to sql server

前端 未结 14 2115
醉梦人生
醉梦人生 2020-11-30 11:37

I want to use PHP to connect to sql server database.

I installed xampp 1.7.0(php 5.2) and SQLSRV20. I\'ve added the extensions in php.ini and I get thi

14条回答
  •  情书的邮戳
    2020-11-30 12:05

    if your using sqlsrv_connect you have to download and install MS sql driver for your php. download it here http://www.microsoft.com/en-us/download/details.aspx?id=20098 extract it to your php folder or ext in xampp folder then add this on the end of the line in your php.ini file

    extension=php_pdo_sqlsrv_55_ts.dll
    extension=php_sqlsrv_55_ts.dll
    

    im using xampp version 5.5 so its name php_pdo_sqlsrv_55_ts.dll & php_sqlsrv_55_ts.dll

    if you are using xampp version 5.5 dll files is not included in the link...hope it helps

提交回复
热议问题