phpcms V9 get 实现前台搜索结果分页

来源:互联网 发布:蘑菇街秒杀软件 编辑:程序博客网 时间:2024/05/22 10:39

                
1
2
3
4
5
6
7
8
9
10
11
12
<?php $keywords=$_GET['keywords'];?>
{pc:get sql="Select * from `v9_news` where `title` like '%$keywords%'" num="20" page="$page"}
      <ul class="">      
      {loop $data $i $r}
        <li><a href="{$r[url]}" target="_blank"><img src="{$r[thumb]}" width="280" height="280" alt="{$r[title]}"></a>
          <div class="intro">
            <p class="title"><a href="{$r[url]}" target="_blank">{$r[title]}</a></p>
          </div>
        </li>
      {/loop}
      </ul>
{/pc}