帝国cms搜索页模板关键字结果标题加红的方法建站

SEO新闻
搜索列表模板列表内容模板(list.var) (*)加上以下代码 1$searchid = $_GET['searchid']; 2$search=$empire-fetch1(select keyboard from {$dbtbpre}enewssearch where s...

 搜索列表模板列表内容模板(list.var) (*)加上以下代码

1 $searchid = $_GET['searchid'];

2 $search=$empire->fetch1("select keyboard from {$dbtbpre}enewssearch where searchid='$searchid' limit 1");

3 $keyboard = $search['keyboard'];

4 $title=str_replace($keyboard,"<font color='red'>$keyboard</font>",$r[title]);

5 $smalltext=str_replace($keyboard,"<font color='red'>$keyboard</font>",$r[smalltext]);

6 $listtemp='

7 <li><a href="[!--titleurl--]" title="[!--oldtitle--]" target="_blank">'.$title.'</a>

8 <div class="media-box-note">'.$smalltext.'</div></li>';

1
联系我们