SHARE
TWEET

Untitled

a guest Dec 13th, 2016 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?PHP
  2.     $servername = "TSHA105S4074SQLEXPRESS";    //serverNameinstanceName
  3. //  $username = "";    // exclude UID, using windows authentication
  4. //  $password = "";    // exclude PWD, using windows authentication
  5.     $connectionInfo = array("Database"=>"oes_project_db.mdf");
  6.     $conn = sqlsrv_connect($serverName, $connectionInfo);
  7.     if( $conn ) {
  8.          echo "Connection established.<br />";
  9.     }else{
  10.          echo "Connection could not be established.<br />";
  11.          die( print_r( sqlsrv_errors(), true));
  12.     }
  13. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top