<?php

$serverName = "서버IP";
$connectionInfo = array ("Database"=>"DB명","UID"=>"DB유저명","PWD"=>"DB패스워드");
$conn = sqlsrv_connect($serverName, $connectionInfo);
    

if ($conn) {

echo "연결 성공!\n";

} else {

echo "연결 실패!\n";

die ( print_r (sqlsrv_errors(), true)); 

}

sqlsrv_close($conn);

?>