亚洲最大看欧美片,亚洲图揄拍自拍另类图片,欧美精品v国产精品v呦,日本在线精品视频免费

  • 站長資訊網(wǎng)
    最全最豐富的資訊網(wǎng)站

    phpcms v9搜索功能怎么做

    phpcms v9搜索功能怎么做

    phpcms v9搜索功能怎么做?phpcmsV9 全站搜索功能如何實現(xiàn)

    給大家分享一下如何運用搜索功能吧,

    1. 首先, 模塊->全站搜索->添加搜索分類,添加搜索分類,此時生成的ID為typeid

    phpcms v9搜索功能怎么做

    2. 添加form表單,此時的typeid即為上圖的id,siteid為站點的id

    <form method="get" action="{APP_PATH}index.php" target="_blank">    <td width="">搜索:</td>    <td width="">      <input type="text" name="q" id="q" value="" class="inputCom" style="width:196px; height:22px; line-height:22px;">      <input type="hidden" name="m" value="search"/>      <input type="hidden" name="c" value="index"/>      <input type="hidden" name="a" value="init"/>      <input type="hidden" name="typeid" value="{$typeid}" id="typeid"/>      <input type="hidden" name="siteid" value="{$siteid}" id="siteid"/>    </td>    <td width=""><input type="image" src="{IMG_PATH}sousuo.jpg" border="0" class="sousuo" id="search_btn"></td> </form>

    3.修改搜索頁面 phpcmstemplatesdefaultsearchlist.html

    {pc:get sql="SELECT * FROM `表名` where title like '%$q%' order by id DESC " num="10" page="$page" return="data"}     {loop $data $r}     <tr>        <td width="500" align="left" style="margin-top:2px; ">· <a href="{$r[url]}" title="{$r[title]}" class="centerTitle" style="text-decoration:none" >{$r[title]}</a></td>        <td width="200" align="right" style="color:#FF6600;margin-top:2px;">{date('Y-m-d',$r[inputtime])}</td>     </tr>     {/loop}     {if empty($data)}未找到結果{/if}     <div class="pages">{$pages}</div> {/pc}

    此時,搜索頁面就可以了。

    PHP中文網(wǎng),大量的免費PHPCMS教程,歡迎在線學習!

    贊(0)
    分享到: 更多 (0)
    網(wǎng)站地圖   滬ICP備18035694號-2    滬公網(wǎng)安備31011702889846號