Personal experience, in the Internet to find a connection to the SQL Server database method, or is not good to find, most of them are copied a person, and this person's write not all, hehe, first introduce my method of connection. If you are using thinkphp connection, then the most important thing is the configuration problem.
My PHP version is 5.3, just say 5.3 of the way.
1, first to download
Php_pdo_sqlsrv_53_ts_vc9.dll
Php_sqlsrv_53_ts_vc9.dll
: http://share.weiyun.com/dc589fc41567ce6e3fb8b131ec1553ff
These two files
2, copy to the PHP directory under the EXT directory
3. Modify the php.ini file in PHP directory:
At the end of the document add
Extension=php_sqlsrv_53_ts_vc9.dll
Extension=php_pdo_sqlsrv_53_ts_vc9.dll
4. Then find
Mssql.secure_connection
Change the value to ON
Save php.ini File
5. Restart Apache
6. Open the thinkphp configuration file
Change Db_type to: sqlsrv
Fill in the correct database server address, user name, password, etc.
Once the above configuration is complete, you can access the SQL Server database
thinkphp connecting to a SQL Server database