phpcms v9搜索标题中含有的很多关键词都没有搜索结果?
发布时间:2021-12-17 11:05:27 所属栏目:经验 来源:互联网
导读:进入到phpcms/modules/search/index.php文件,找到 //如果分词结果为空 if(!emptyempty($segment_q)) {$sql = `siteid`= $siteid AND `typeid` = $typeid $sql_time AND MATCH (`data`) AGAINST ($segment_q IN BOOLEAN MODE);} else {$sql = `siteid`= $sitei
进入到phpcms/modules/search/index.php文件,找到 //如果分词结果为空 if(!emptyempty($segment_q)) {$sql = "`siteid`= '$siteid' AND `typeid` = '$typeid' $sql_time AND MATCH (`data`) AGAINST ('$segment_q' IN BOOLEAN MODE)";} else {$sql = "`siteid`= '$siteid' AND `typeid` = '$typeid' $sql_time AND `data` like '%$q%'";} 修改为:$sql = "`siteid`= '$siteid' AND `typeid` = '$typeid' $sql_time AND `data` like '%$q%'";,这样基本上就能解决一般的搜索功能了。 (编辑:好传媒网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |