Connection database sql server 2008 PDO [closed]

1

I'm using the following code:

try {

$con = new PDO("sqlsrv:Server=ip;Database=nome","nome","12345");

$con->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);  


} catch (PDOException $e) {
die ("Erro na conexao com o banco de dados: ".$e->getMessage());
}

I'm trying to connect to a sql server 2008 database, and I'm using xampp because the screen goes white. I already checked extensions in php.ini and everything.

    
asked by anonymous 28.12.2015 / 13:55

0 answers