1. Download Microsoft Drivers for PHP for SQL Server expansion pack It's divided into versions 2.0 and 3.0.
This. (I am using the 2.0 version)
This expansion pack is required for the computer's operating system, and the corresponding system uses the corresponding version.
Operating Systems supported by the 3.0
Windows Server R2 SP1
Windows Vista SP2
Windows Server SP2
Windows 7 SP1
2.0 Supported Operating systems
Windows Server 2003 Service Pack 1
Windows XP Service Pack 3
Windows Vista Service Pack 1 or later
Windows Server 2008
Windows Server R2
Windows 7
So this example uses 2.0 inside the php_sqlsrv_53_ts_vc9.dll extension;
2. Copy the Php_sqlsrv_53_ts_vc9.dll file to the PHP extension folder (typically
Php/ext folder below);
3. Copy this Php_sqlsrv_53_ts_vc9.dll file to the system32 of the disk on which the system resides;
4. Open the php.ini file and add the following line to the Extension=php_mysql.dll
Extension=php_sqlsrv_53_ts_vc9.dll
5. Installing the Driver X86 package (Sqlncli.msi)
If the connection is sql2005, install the sqlncli2005
If the connection is sql2008, install the sqlncli2008
If the connection sql2015 is installed sqlncli2015
6. Restart Apache
The above describes the PHP connection to SQL Server methods, including SQL Server content, I hope that the PHP tutorial interested in a friend to help.