首页  »  站长资讯  »  网站优化

织梦通过ID搜索出对应文章结果的实现办法

2023/03/11 12:23     创新屋收录网     已浏览357次
应用场景:我们有知道一个模板的演示站地址,如:http://www.80zhan.com/plus/demo.php?aid=8420 我们如何在80站长网里找到相应的模板呢。

很简单,我们可以通过aid=8420 直接搜索该id, 索引到相应文档内容

实现的办法:

打开include>arc.searchview.class.php

找到278行,$ks = explode(' ',$this->Keywords); 在其上面加入以下代码:   

//new add

if(is_numeric($this->Keywords)){

return " arc.id={$this->Keywords}";

}

即可