打开 ask/data/scores.inc.php 文件,找到 transport() 函数

function transport()
{
global $cfg_basehost;
$path = $cfg_basehost.’/’.APPNAME.”/?ct=index&ac=scores”;
$host = preg_replace(‘#http://#’,”,$cfg_basehost);
$str = “”;
$fp = fsockopen($host,80,$errno,$errstr,30);
if(!$fp)
{
die(“service.dedecms.com”.$errstr.$errno);
}else{
fputs($fp, “POST $path HTTP/1.1\r\n”);
fputs($fp, “Host: $host\r\n”);
fputs($fp, “Content-type: application/x-www-form-urlencoded\r\n”);
fputs($fp, “Content-length: “.strlen($str).”\r\n”);
fputs($fp, “Connection: close\r\n\r\n”);
fputs($fp, $str.”\r\n\r\n”);
fclose($fp);
}

}

将此函数中红色字体部分注释或删除即可解决织梦dedecms问答模块显示service.dedecms.com的问题。

注释:
function transport()
{
/*global $cfg_basehost;
$path = $cfg_basehost.’/’.APPNAME.”/?ct=index&ac=scores”;
$host = preg_replace(‘#http://#’,”,$cfg_basehost);
$str = “”;
$fp = fsockopen($host,80,$errno,$errstr,30);
if(!$fp)
{
die(“service.dedecms.com”.$errstr.$errno);
}else{
fputs($fp, “POST $path HTTP/1.1\r\n”);
fputs($fp, “Host: $host\r\n”);
fputs($fp, “Content-type: application/x-www-form-urlencoded\r\n”);
fputs($fp, “Content-length: “.strlen($str).”\r\n”);
fputs($fp, “Connection: close\r\n\r\n”);
fputs($fp, $str.”\r\n\r\n”);
fclose($fp);
}*/
}

删除:
function transport()
{

}

发表评论

电子邮件地址不会被公开。 必填项已用*标注