connect sql server with php on mac

1

I'm trying to connect sqlserver with php in mac but I can not get it.

It is assumed that the following code should give me an established connection but I can not get it.

<?php
$serverName = "192.168.4.5";
$$connectionInfo = array("Database"=>'alumnos', 'UID'=>'sa', 'PWS'=>'root', 'CharacterSet' => 'UTF-8');
$conn = sqlsrv_connect( $serverName, $connectionInfo);

if( $conn ) {
     echo "Conexión establecida.<br />";
}else{
     echo "Conexión no se pudo establecer.<br />";
     die( print_r( sqlsrv_errors(), true));
}
?>
    
asked by Mateo Diaz lopez 09.02.2018 в 17:55
source

1 answer

-2

Did you add the dls of the sqlsrv () functions? And you also added them to the php.ini?

Without any of these steps it is impossible to connect to sql.

    
answered by 20.09.2018 в 16:32