DedeCMS采集文章后導(dǎo)出為僅動(dòng)態(tài)的解決方案
時(shí)間: 2018-12-09 20:40
閱讀: 次
作者:素材無憂網(wǎng)
想要讓DedeCMS采集文章后,直接導(dǎo)出成僅動(dòng)態(tài)的類型,而不是未生成?按照下面步驟即可實(shí)現(xiàn)。
登陸FTP,尋找 dede/co_export.php 文件,找到如下代碼:
//插入數(shù)據(jù)庫
$rs = $dsql->ExecuteNoneQuery($indexSql);
if($rs)
{
$aid = $dsql->GetLastID();
$mainSql = str_replace('152327',$aid,$mainSql);
$addSql = str_replace('152327',$aid,$addSql);
$mainSql = ereg_replace('@([a-z0-9]{1,})@','',$mainSql);
$addSql = ereg_replace('@([a-z0-9]{1,})@','',$addSql);
$rs = $dsql->ExecuteNoneQuery($mainSql);
if(!$rs)
{
echo "導(dǎo)入 '$title' 時(shí)錯(cuò)誤:".$dsql->GetError()."
";
$dsql->ExecuteNoneQuery("Delete From `arctiny` where id='$aid' ");
}
else
{
$rs = $dsql->ExecuteNoneQuery($addSql);
if(!$rs)
{
echo "導(dǎo)入 '$title' 時(shí)錯(cuò)誤:".$dsql->GetError()."
";
$dsql->ExecuteNoneQuery("Delete From `arctiny` where id='$aid' ");
$dsql->ExecuteNoneQuery("Delete From `$maintable` where id='$aid' ");
}
}
}
$dsql->ExecuteNoneQuery("update `co_htmls` set isexport=1 where aid='$exid' ");
}
請(qǐng)將紅色代碼修改為如下代碼(直接替換即可)
$dsql->ExecuteNoneQuery("update `archives` set ismake=-1 where id='$aid' ");
標(biāo)簽: