Skip to main content
 Web开发网 » 站长学院 » 织梦教程

火车头采集器采集相同标题不再发布

2020年09月12日6740百度已收录

织梦火车头采集器采集相同标题改成更新内容,不再发布相同文档,防止重复。

 

普通文章实现方法

 

1、打开 /dede/article_add.php 找到

 

require_once(DEDEINC.'/image.func.php');

在它上面加入

 

$arcrow = $dsql->GetOne("SELECT * FROM `archives` WHERE title='$title'");

$aid = $arcrow['id'];if(is_array($arcrow))

{

    header("HTTP/1.1 307 Moved Permanently");

    header("Location:article_edit.php?aid={$aid}&id={$aid}");   exit();

}

 

如果要保留文档原来的自定义属性或者其他字段的值,可以修改上面的header,例如自定义属性的话这样写 header("Location:article_edit.php?aid={$aid}&id={$aid}&flags[]={$arcrow['flag']}");

完成。


 

评论列表暂无评论
发表评论
微信