POST TIME:2020-03-29 11:53
最近發現織夢模板如果開啟了多站點支持絕對網址后生成RSS會出現錯誤,經過一番研究,終于解決。
首先請大家打開系統文件:include/arc.rssview.class.php
找到
$this->TypeFields['typelink'] = $GLOBALS['cfg_basehost'].$this->TypeLink->GetOneTypeUrl( $this->TypeFields);
將其改為
$this->TypeFields['typelink'] = ($GLOBALS['cfg_multi_site']=="Y")?$this->TypeLink->GetOneTypeUrl( $this->TypeFields) : $GLOBALS['cfg_basehost'].$this->TypeLink->GetOneTypeUrl( $this->TypeFields);
這個是目錄的 同樣文章的也加一個是否開啟了絕對地址的判斷
再找到
$row["fullurl"] = $GLOBALS["cfg_basehost"].$row["arcurl"];
然后改為
$row["fullurl"] = ($GLOBALS['cfg_multi_site']=="Y")?$row["arcurl"]: $GLOBALS["cfg_basehost"].$row["arcurl"];
至此,一切OK。