1.下载sqlserver扩展
https://www.microsoft.com/en-us/download/details.aspx?id=20098
解压到
\phpStudy\PHPTutorial\php\php-7.2.1-nts\ext
php.int
extension=php_pdo_sqlsrv_72_nts_x64.dll
extension=php_sqlsrv_72_nts_x64.dll
安装 msodbcsql.msi
不然报错
This extension requires the Microsoft ODBC Driver for SQL Server. Access the following URL to download the ODBC Driver for SQL Server for x64
代码:sqlcon.php
$serverName = "localhost"; $connectionInfo &#