主頁(yè) > 網(wǎng)站建設(shè) > 建站知識(shí) > 織夢(mèng)CMS問(wèn)答頁(yè)面打不開,出現(xiàn)service.dedecms.comphp

織夢(mèng)CMS問(wèn)答頁(yè)面打不開,出現(xiàn)service.dedecms.comphp

POST TIME:2020-04-02 17:17

我們安裝了織夢(mèng)問(wèn)答模塊后,第一次訪問(wèn)問(wèn)答有時(shí)會(huì)打不開,出現(xiàn)這個(gè)錯(cuò)誤“service.dedecms.comphp_network_getaddresses: gethostbyname failed. errno=20”,解決這個(gè)問(wèn)題,請(qǐng)按照下面的方法修改即可。

找到ask/data/scores.inc.php文件,并找到下面的代碼:

function transport()
{
global $cfg_basehost;
$path = $cfg_basehost.'/'.APPNAME."/?ct=index&ac=scores";
$host = preg_replace('##','',$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 ");
fputs($fp, "Host: $host ");
fputs($fp, "Content-type: application/x-www-form-urlencoded ");
fputs($fp, "Content-length: ".strlen($str)." ");
fputs($fp, "Connection: close ");
fputs($fp, $str." ");
fclose($fp);
}
}

直接注釋掉 transport() 里面的內(nèi)容就可以了

function transport()
{
/* global $cfg_basehost;
$path = $cfg_basehost.'/'.APPNAME."/?ct=index&ac=scores";
$host = preg_replace('##','',$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 ");
fputs($fp, "Host: $host ");
fputs($fp, "Content-type: application/x-www-form-urlencoded ");
fputs($fp, "Content-length: ".strlen($str)." ");
fputs($fp, "Connection: close ");
fputs($fp, $str." ");
fclose($fp);
}*/
}

好了,問(wèn)題解決。



收縮
  • 微信客服
  • 微信二維碼
  • 電話咨詢

  • 400-1100-266