The report is as follows:
Uncaught Error: Call to undefined function sqlsrv_connect()
The version is PHP 7.2.10 SQLserver 2008R2Apache
$servern = '192.168.60.21';
$coninfo = array("Database"=>"byjzyy","UID"=>"sa","PWD"=>" W_123");
$conn=sqlsrv_connect($servern,$coninfo) or die("Link failed!! Please try again!");
$val=sqlsrv_query($conn,"select top 10 * from goodsdoc");
while($row=sqlsrv_fetch_array($val)){
echo $row."<br>";
}
sqlite_close($conn);
Downloaded Microsoft Drivers for PHP for SQL Server Put:
php_pdo_sqlsrv_7_ts_x86.dll and php_sqlsrv_7_ts_x86.dll into \php-7.2.1-nts \ext
And in php.ini
extension=php_sqlsrv_72_ts_x86.dll
extension=php_pdo_sqlsrv_72_ts_x86.dll
Restarted Apache
I still get an error. Please give me some advice.