Demo entry 6742957



Submitted by anonymous on May 20, 2018 at 05:25
Language: HTML. Code size: 1.3 kB.

<div class="mainbar">
        <!-- 文章开始 -->
          <?php foreach($rows as $v){ 
            $sql="select count(*) from com where a_id={$v['id']}";

          <div class="article">
          <h2><span><?php echo $v['title'] ?></span></h2>
          <div class="clr"></div>
          <p><?php echo $v['author']; ?><span>&nbsp;&bull;&nbsp;</span> <?php echo date('Y-m-d H:i:s',$v['time']); ?><span>&nbsp;&bull;&nbsp;</span>评论(<?php echo $num; ?></p>
          <?php if($v['thumb']!=''){
            echo "<img src='{$v['thumb']}' width='613' height='193' alt='image' />";
          <div class="clr"></div>
          <!-- 文章内容 -->
          <?php if(strlen($v['content'])>100){
                  echo mb_substr($v['content'],0,100,'utf-8').'…………';
              echo $v['content'];

          <p><a href="art.php?a_id=<?php echo $v['id'] ?>">更多</a></p>

      <?php } ?>
        <!-- 文章结束 -->

       <div class="article" style="padding:5px 20px 2px 20px; background:none; border:0;">
          <p><span class="butons"><?php echo $m->c(); ?></span></p>


This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).