在帝國cms網(wǎng)站前臺搜索一個關(guān)鍵字,如果在網(wǎng)站中查詢到了,這個關(guān)鍵字會被記錄入搜索關(guān)鍵字表中,但是如果在網(wǎng)站中沒有搜索到,就不會記錄入搜索關(guān)鍵字表中,那怎么把沒有搜索結(jié)果的關(guān)鍵字才能記錄到數(shù)據(jù)庫中,方法如下:
打開/e/search/index.php
在$searchid=0上方加入以下代碼;
$sql=$empire->query("insert into {$dbtbpre}enewssearch(searchtime,keyboard,searchclass,result_num,searchip,classid,onclick,orderby,myorder,checkpass,tbname,tempid,iskey,andsql,trueclassid) values('$searchtime','$keyboard','$newsearchclass','$search_num','$ip','$classid',1,'$orderby','$myorder','$checkpass','$tbname','$s_tempid','$iskey','$andsql','$trueclassid')");文章來源:http://www.zghlxwxcb.cn/news/detail-436380.html
這樣方便后期統(tǒng)計這些關(guān)鍵詞并把沒有的內(nèi)容整理添加。文章來源地址http://www.zghlxwxcb.cn/news/detail-436380.html
到了這里,關(guān)于帝國cms將沒有搜索到結(jié)果的關(guān)鍵字存入到數(shù)據(jù)庫的方法的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!