php et模板应用 不指定

Else , 2007/10/16 15:27 , 代码片段,演示也有 , Comments(0) , Reads(6489) , Via Original
php文件
#全站热点文章
$site_hot_query=$db->query("SELECT id,title FROM ruby WHERE view=1  order by countruby desc LIMIT 0,12");
    $site_hot_list = array();  
    while($qs = $db->fetch_array($site_hot_query)){
      $qs['tte']    =$qs['title'];
      $qs['title']  = cnSubStr($qs['title'],34);
    $site_hot_list[] = $qs;
    }

模板文件

  <div class="cls8_1">
  <div class="cls8_1_1">&nbsp;本站热门</div>
  <div class="cls8_1_2">
        <!--$site_hot_list as $hot -->
   ·<a href=show.php/{hot['id']}.html title="{hot['tte']}">{hot['title']}</a><br />
   <!-- END -->
            </div>
  </div>
Tags: ,
Add a comment

Nickname

Site URI

Email

Enable HTML Enable UBB Enable Emots Hidden Remember [Login] [Register]