I want to connect a cloud mssql server from my xampp localhost using pdo? How to do that?
try {
$hostname = "xxxxxx";
$dbname = "xxxxxx";
$username = "xxxxxxx";
$pw = "xxxxxxx";
$dbh = new PDO ("mssql:host=$hostname;dbname=$dbname","$username","$pw");
} catch (PDOException $e) {
echo "Failed to get DB handle: " . $e->getMessage() . "\n";
exit;
}
it gives error Failed to get DB handle: could not find driver
i dont know any other information about the db...only i know is that it is a cloud mssql database...pls help me in this
my localhost php version is 5.6.31 i am using xampp in windows 7