Last active
April 25, 2018 22:47
-
-
Save nucreativa/03d0812049c4bcb5c476 to your computer and use it in GitHub Desktop.
How to make connection SQL Server 2000 in PHP 5.4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://robsphp.blogspot.com/2012/09/how-to-install-microsofts-sql-server.html | |
https://stackoverflow.com/questions/19783613/how-to-connect-to-mssql-2000-from-php-5-3-and-up/19787528#19787528 | |
https://onedrive.live.com/?cid=669ee24817961774&id=669EE24817961774%21720 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$serverName = "serverName\sqlexpress"; //serverName\instanceName | |
// Since UID and PWD are not specified in the $connectionInfo array, | |
// The connection will be attempted using Windows Authentication. | |
$connectionInfo = array( "Database"=>"dbName"); | |
$conn = sqlsrv_connect( $serverName, $connectionInfo); | |
if( $conn ) { | |
echo "Connection established.<br />"; | |
}else{ | |
echo "Connection could not be established.<br />"; | |
die( print_r( sqlsrv_errors(), true)); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment