Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Connect php with sqlserver
Message
De
14/10/2016 03:01:25
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Connect php with sqlserver
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows 7
Network:
Windows XP
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01641931
Message ID:
01641931
Vues:
40
Sir,

I am using wamp 3.0 having php 5.6.15
SQLSERVER 2008 is installed on Windows 7 32bit.

I want to connect sqlserver with php, So I put required drives in Bin folder as

attached image aa

and made some necessary changes in php.ini as

attached image bb

Finally I have this connection string
<?php
$host="SERVER";
$username="sa";
$password="123456";
$db_name="at17"; 
$con=sqlsrv_connect($host, $username, $password,$db_name);

if(!$con){
die ('<script type="text/javascript">alert("Error Connecting to host")'. mysqli_connect_error($con).'</script>'); 
}
else
{
//echo( '<script type="text/javascript">alert("Connected")</script>');
}
?>
But it displays this error message

attached image cc-png

What I am doing wrong?

Please help me
Répondre
Fil
Voir

Click here to load this message in the networking platform