咨询热线:4006-75-4006
售前:9:00-23:30 备案:9:00-18:00 技术:7*24h
解决的办法如下:
首先连接 FTP到空间,进入到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%’”;//phpfensi.com
}
把以上代码替换为:
$sql = “`siteid`= ‘$siteid’ AND `typeid` = ‘$typeid’ $sql_time AND `data` like ‘%$q%’”;
这段代码就是去掉了判断,不管是否是空都会从数据库中取出在前台显示出来,这样就不会存在分词搜索不到的情况了.