What is the method to connect sqlserver in php7
This article introduces how to connect php7 to Sqlserver. It mainly includes usage examples of php7.2 connecting to Sqlserver, application skills, summary of basic knowledge points and matters needing attention. It has certain reference value and friends in need can refer to it.
First of all, php needs to enable the sqlsrv extension
1. Download SQLSRV40.EXE (supports php7.0), https:// www.microsoft.com/en-us/download/details.aspx?id=20098
Note: For the difference between ts and nts, see phpinfo
to php.ini
extension=php_sqlsrv_7_ts_x64.dllOpen extension##5. Install ODBC Driver 11 For SQL (msodbcsql.msi)
https://www.microsoft.com/en-us/download/details.aspx?id=36434
6. Run msodbcsql.msi to complete the installation
Note:
7. Restart apache, the sqlsrv extension is successfully opened
Note: The php7.1 version will not be successfully opened according to this method, the reason The two extension files php_pdo_sqlsrv_7_ts_x64.dll and php_sqlsrv_7_ts_x64.dll are not applicable to php7.1. Please search for these two extension files suitable for php7.1
Recommended learning:
php video tutorialThe above is the detailed content of What is the method to connect sqlserver in php7. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics









