搜索实现百度这种表现样式
原创作者:okrm

修改搜索页模板search.htm
在foreach($listdb AS $key=>$rs){
下面加上一句:
$rs[title]=str_replace("$keyword","<font color='#C60A00'>$keyword</font>",$rs[title]);
就行了。
如果想要像百度那样显示内容简介的话,再加上一句:
$rs[content]=get_word(strip_tags($rs[content]),$fidDB[config][listContentNum]>0?$fidDB[config][listContentNum]:280);
然后在模板里适当的位置加上$rs[content] 就OK了
|
点击率:1080
|
|