PHP Fatal Error: Call to undefined function sqlsrv_connect () inphp link SQL Server appears because: php5.3 and above have removed the previous link method, want to use , you need to use PDO or SQLSVR, plus the DLL extensions provided by Microsoft. Before on-line see have written to php5.5 link SQL SERVER, feel not enough detailed, so oneself write again a php5.6. Previously seen php5.5 tutorial http://blog.csdn.net/xocom/article/details/45840725 Microsoft Official website DLL does not support 64-bit, here is an unofficial version of the download link HTTP// download.csdn.net/detail/tan1103/8771927 download good after decompression, wherein the x64 folder is supported 64-bit system, we use the php5.6 version used to two files Php_sqlsrv_56_nts.dll and Php_pdo_sqlsrv_56_nts.dll or
Php_sqlsrv_56_ts.dll and Php_pdo_sqlsrv_56_ts.dll, that's TS? Or the NTS?
TS and NTS mean: thread-safe. and PHP version, with phpinfo (); View, print out phpinfo, find the thread Safety, if disabled is non-thread-safe, use NTS version;
If the Enable is the TS version, mine is NTS.
Then copy the corresponding version of the DLL files (my Php_sqlsrv_56_nts.dll and Php_pdo_sqlsrv_56_nts.dll) to Php5.6\ext (the folder where the extension is located, mostly under the PHP directory);
Then introduce the extension in php.ini, here is my reference path, D:\php5.6\ext\ is also the directory where the extension files
Extension=d:\php5.6\ext\php_sqlsrv_56_nts.dll
Extension=d:\php5.6\ext\php_pdo_sqlsrv_56_nts.dll
(My php.ini's Extension_dir is located to the C \ disk, so I need to use an absolute path reference, can also be modified to Extension_dir=ext, and then the relative path reference is also OK, such as extension=php_sqlsrv_56_ Nts.dll, most do not have to modify, anyway with absolute path quasi correct)
Finally restart the service (Apache restarts Apache,iis on restart IIS), OK.
Reprint: http://blog.csdn.net/qq_27396589/article/details/53374769
php5.6 Connecting to SQL SERVER