I have a php website hosted in 1and1.com, but when I connect to our local server database(windows server 2012 and sql server 2012) it gives me no luck, it gives me this error:
Call to undefined function sqlsrv_connect() in dbconn.php on line 9.
here's my database connection:
<?php
$serverName='xxx.xxx.00.xx'; //<-- should I include PORT here?
$connectionInfo=array(
'Database'=>'DBName',
'UID'=>'userName',
"PWD"=>'Password');
$conn = sqlsrv_connect($serverName,$connectionInfo); //<-- line 9 here
if($conn){
//echo 'Connection Established!<br />';
}else{
//echo 'Connection Failed!<br />';
die(print_r(sqlsrv_errors(),TRUE));
}
?>
Actually, I'm confused what to use.. like should I use IIS here or other procedures but for development, I used XAMPP to test my website.
I'm new with this kind of stuff, so if you can provide me some step by step articles for this is much more appreciated.
Thanks in advance!