### [phpcms v9搜索功能怎么做](https://www.prosaas.cn/article/6353) **Published:** 2020-02-03T02:57:33 **Author:** 5201314 **Excerpt:** phpcms v9搜索功能怎么做?phpcmsV9 全站搜索功能如何实现给大家分享一下如何运用搜索功能吧,1.… **![](//zhiqipro.oss-cn-beijing.aliyuncs.com/2023/12/20231212124942340.jpg)** **phpcms v9搜索功能怎么做?phpcmsV9 全站搜索功能如何实现** 给大家分享一下如何运用搜索功能吧, 1\. 首先, 模块->全站搜索->添加搜索分类,添加搜索分类,此时生成的ID为typeid ![](//zhiqipro.oss-cn-beijing.aliyuncs.com/2023/12/20231212124942268.png) 2\. 添加form表单,此时的typeid即为上图的id,siteid为站点的id
搜索:
3.修改搜索页面 phpcms\\templates\\default\\search\\list.html {pc:get sql="SELECT \* FROM \`表名\` where title like '%$q%' order by id DESC " num="10" page="$page" return="data"} {loop $data $r} · {$r\[title\]} {date('Y-m-d',$r\[inputtime\])} {/loop} {if empty($data)}未找到结果{/if}
{$pages}
{/pc} 此时,搜索页面就可以了。 PHP中文网,大量的免费PHPCMS教程,欢迎在线学习! 以上就是phpcms v9搜索功能怎么做的详细内容,更多请关注知企PROSAAS其它相关文章! **Categories:** PHPCMS ---