I’m attempting to use the following code to connect to a SQL database on another domain from within a PHP hosted domain. I don’t get any errors, in fact I don’t get anything. Page source shows nothing. Any idea what’s going on?
<?php $serverName = "an ip address like 50.35.24.59"; $connectionInfo = array( "Database"=>"databasename", "UID"=>"userid", "PWD"=>"password"); $conn = sqlsrv_connect( $serverName, $connectionInfo); if( $conn ) { echo "Connection established."; }else{ echo "Connection could not be established.
"; die( print_r( sqlsrv_errors(), true)); } ?>