0

MS SQL server Connection to PHP Using Wamp Server, I Will follow this Step :

My System Windows 7 64-bit
installed Wamp Server 64-bit
SQLSRV32.EXE installed in C:\wamp\bin\php\php5.6.31\ext

wamp server PHP.ini file give extension

extension=php_sqlsrv_56_nts.dll
extension=php_sqlsrv_56_ts.dll
extension=php_pdo_sqlsrv_56_ts.dll
extension=php_pdo_sqlsrv_56_nts.dll

Demo.php`

<?php
$serverName = "ZALA-PC\EURASIAN";
$connectionInfo = array("Database" => "Demo", "UID"=>"sa" , "PWD"=>"stcare@1");
$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));
}
?>
tadman
  • 208,517
  • 23
  • 234
  • 262
Zala
  • 19
  • 4

0 Answers0