加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > CMS系统 > Dedecms > 正文

dedecms搜索伪静态及显示热门搜索词的方法

发布时间:2020-12-14 03:45:49 所属栏目:Dedecms 来源:网络整理
导读:dedecms搜索伪静态 RewriteEngine On RewriteBase / RewriteRule ^tags/(.+)/$ /plus/search.php?kwtype=0keyword=$1searchtype=titlekeyword 单页显示显示热门搜索词和搜索次数的方法 把下面的代码保存到index.php中,当然可以其他的名字 ?php require_once

dedecms搜索伪静态

RewriteEngine On
RewriteBase /
RewriteRule ^tags/(.+)/$ /plus/search.php?kwtype=0&keyword=$1&searchtype=titlekeyword

单页显示显示热门搜索词和搜索次数的方法

把下面的代码保存到index.php中,当然可以其他的名字

<?php

require_once(dirname(__FILE__).'/../include/common.inc.php');

global $cfg_mainsite,$cfg_plus_dir;

$cfg_phpurl = $cfg_mainsite.$cfg_plus_dir;

$dsql = new DedeSql(false);

$dsql->SetQuery("Select keyword,result From dede_search_keywords order by result desc limit 0,100");

$dsql->Execute('hw');

$hotword = "";

while($row=$dsql->GetArray('hw')){

 if($row['istag']==1) $hotword .= "

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读