Advertisement
Guest User

Untitled

a guest
Dec 13th, 2016
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  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. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement