一、安装SQL Driver for PHP 2.0
下载SQL Driver for PHP2.0,地址是:http://msdn.microsoft.com/en-us/sqlserver/ff657782.aspx
解压后根据PHP的版本选择对应的.dll文件,放入PHP扩展目录。PHP版本对应的.dll是(在压缩包内的SQLSRV_Readme.html里):
Driver file |
PHP version |
Thread safe? |
Use with PHP .dll |
---|---|---|---|
php_sqlsrv_53_nts_vc6.dll php_pdo_sqlsrv_53_nts_vc6.dll |
5.3 |
no |
php5.dll |
php_sqlsrv_53_nts_vc9.dll php_pdo_sqlsrv_53_nts_vc9.dll |
5.3 |
no |
php5.dll |
php_sqlsrv_53_ts_vc6.dll php_pdo_sqlsrv_53_ts_vc6.dll |
5.3 |
yes |
php5ts.dll | <