I would like to connect to my database which is on an SQL Server, but to do so I need to specify several items including a sid. I don't understand where my error comes from, but when I run my code I get the following error:
"Error: could not find driver".
Can you help me?
<?php
$bdName = "bdname";
$username = "username";
$password = "mdpname";
$host = "remotehost";
$port = 1521;
$sid = "mysid";
$dsn = "sqlsrv:dbname=".$bdName."//".$host.":".$port."/".$sid;
try {
$bdd = new PDO($dsn,$username,$password);
//echo "<p> Connexion OK </p>";
} catch (PDOException $e) {
echo "<p> Erreur Connexion </p>";
print "Erreur !: " . $e->getMessage() . "<br/>";
die();
}