phpcms v9搜索标题中含有的很多关键词都没有搜索结果?
发布时间:2021-12-17 10:46 所属栏目:19 来源:互联网
导读:进入到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%'";,这样基本上就能解决一般的搜索功能了。 (编辑:ASP站长网) |
相关内容
网友评论
推荐文章
热点阅读