How to connect php to sqlserver Database development software Database basic learning Database repair

WBOY
Release: 2016-07-29 08:53:58
Original
1151 people have browsed it

1. Download the Microsoft Drivers for PHP for SQL Server expansion pack It is divided into versions 2.0 and 3.0

. (I am using version 2.0)

This expansion pack has requirements for the computer’s operating system, and the corresponding system uses the corresponding version.

3.0 Supported operating systems
Windows Server 2008 R2 SP1
Windows Vista SP2
Windows Server 2008 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 2008 R2
Windows 7

So this example uses the php_sqlsrv_53_ts_vc9.dll extension in 2.0;

2. Copy the php_sqlsrv_53_ts_vc9.dll file to php Expand folder (generally under the

php/ext folder);
3. Copy this php_sqlsrv_53_ts_vc9.dll file to system32 on the system disk;
4. Open the php.ini file and set extension=php_mysql.dll Add the following line

extension=php_sqlsrv_53_ts_vc9.dll

5. Install the driver X86 Package (sqlncli.msi)

If you are connecting to sql2005, install sqlncli2005

If you are connecting to sql2008, install it sqlncli2008

If you are connecting to sql2015, install sqlncli2015

6 .Restart apache

The above introduces the method of connecting php to sqlserver, including sqlserver content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template