Fatal error: Uncaught Error: Call to undefined function sqlsrv_connect() in C:\Apache24\htdocs\SQLI\SQL_CON.php:4 Stack trace: #0 {main} thrown in C:\Apache24\htdocs\SQLI\SQL_CON.php on line 4**
I already add this to php.ini file :
extension=php_pdo_sqlsrv_53_ts.dll
extension=php_sqlsrv_53_ts.dll
my simple code is :
<?php
$servername="JOSEPHP-JOSEPHP\SQLEXPRESS";
$connectionInfo = array( "Database"=>"AdventureWorks2014");
$con = sqlsrv_connect($servername, $connectionInfo);
if($con) {
die ("Connect is ok: ".connect_error);
}
else {
echo "Connection could not be established.<br />";
die( print_r( sqlsrv_errors(), true));
}
?>
How can I fix this?