火車頭內(nèi)容采集范例 http://apdwn.com/doc/1084.html 這個文檔教程里只有新發(fā)布的入庫 $rt = $this->content_model->save_content(0, $save);
當(dāng)驗證到重復(fù)時想要改成更新數(shù)據(jù)應(yīng)該怎么改?
// 驗證標(biāo)題重復(fù)
if ($this->content_model->table(SITE_ID.'_'.MOD_DIR)->where('title', $save[1]['title'])->counts()) {
echo '重復(fù)';exit;
}
$abc=$this->content_model->table(SITE_ID.'_'.MOD_DIR)->where('title', $save[1]['title'])->getRow();
然后
$rt = $this->content_model->save_content($abc['id'], $save);
開源是一種精神,但不是義務(wù),幫忙是情分,不幫也不要抱怨,建議大家多研究代碼、多閱讀代碼、多翻閱社區(qū)歷史問題!