我正在将IIS与最新的PHP和SQL Server 2017一起使用。
由于此代码很旧,我想升级到
<?php
function Conectarse()
{
global $link;
if (!($link=mssql_connect("xxxxxxxxxx","sa","1234")))
{
exit();
}
if (!mssql_select_db("UserLogin",$link))
{
exit();
}
return $link;
}
Conectarse();
$AccDir = "xxxxxxxxxxxxxxxxx";
$NameServer = "xxxxxxxxxxxxxxx";
$xxxxxxxWebLink = "http://xxxxxxx.com//";
$xxxxxxxForumLink = "http://xxxxxxxx.com/";
$SupportLink = "http://xxxxxxxxx.com/";
//data for emails
$SMTPUser = "xxxxxxxxx"; //GMail user or POP3 account
$SMTPPass = ""; //Password
$SMTPEmail = "xxxxxxxxx"; //Sender Email
$SMTPName = "xxxxxxxxxxxxx"; //Sender's Name
// Maintenance Mode On / Off
$config = mssql_query("SELECT * FROM ServerConfig");
$config1 = mssql_fetch_array($config);
$config2 = $config1[0];
if($config2 == '1'){ $Mantenimiento = "On"; } else { $Mantenimiento = "Off"; }
// Change of Office
$changecost = '16000'; //Cost of Change
?>
由于mssql
不再受支持,因此我进行了搜索,但是没有运气,这是从config.php获取的。
我收到了这个错误
PHP Fatal error: Uncaught Error: Call to undefined function mssql_connect() in C:\inetpub\wwwroot\xxxxxxxxxx\config\config.php:5
Stack trace:
#0 C:\inetpub\wwwroot\xxxxxxxxxx\config\config.php(15): Conectarse()
#1 {main}
thrown in C:\inetpub\wwwroot\xxxxxxxx\config\config.php on line 5