帝国cms全站全文搜索功能
at 9年前 ca 记录笔记 pv 2011 by authorhu
先将要搜索的数据导入全站搜索表,全站全文才能搜索到。
后台>"栏目管理">"管理搜索数据源">"增加搜索数据源"
全站全文搜索表单语法说明:
搜索表单提交地址:/e/sch/index.php
表单提交方式用:GET
keyboard:搜索关键字变量(前台搜索多个关键字可以用空格隔开)。
field:搜索字段变量,0为按后台设置搜索;1为按全文搜索;2为按标题搜索;3为按内容搜索。
classid:指定要搜索的栏目ID,多个栏目ID用逗号隔开。
<form action='/e/sch/index.php' method="GET" name="search_news"> <table width="100%" border="0" cellspacing="6" cellpadding="0"> <tr> <td height="32">关键字:<input name="keyboard" type="text" value="" /> <select name="field"> <option value="1">全文</option> <option value="2">标题</option> <option value="3">内容</option> </select> <input type="submit" name="Submit2" value="搜索" /> </td> </tr> </table> </form>
版权声明
本文仅代表作者观点,未经许可,不得转载。