$serverName = "serverName"; $connectionInfo = array( "Database"=>"DbName", "UID"=>"UserName", "PWD"=>"Password", "Encrypt"=>true, "TrustServerCertificate"=>true); $conn = sqlsrv_connect( $serverName, $connectionInfo);
Źródło: https://stackoverflow.com/questions/14959492/connecting-to-mssql-from-php-securely-with-encryption