我正在尝试启用SQL驱动程序。 我正在使用xamp我的php版本是7.1.10和架构x86 我安装了SQL驱动程序的第4版,并将文件移动到extesions文件夹,我在php.ini中有这个
extesion=php_sqlsrv_7_nts_x86.dll
extesion=php_pdo_sqlsrv_7_nts_x86.dll
我收到此错误
Fatal error: Uncaught Error: Call to undefined function sqlsrv_connect() in
C:\xampp\htdocs\diplomado\conection.php:4 Stack trace: #0
C:\xampp\htdocs\diplomado\index.php(17): include() #1 {main} thrown in
C:\xampp\htdocs\diplomado\conection.php on line 4
这是我的php文件
$serverName= "localhost";
$conectionInfo = array("DataBase"=>"prueba","UID"=>"Root", "UPW"=>"");
$con = sqlsrv_connect($servername,$conectionInfo);
if ($con){
echo "Succesful";
}else{
echo "failed";
}
?>