new.php 670 B

1234567891011121314151617181920212223
  1. <?php
  2. //查询term字典
  3. require_once "../path.php";
  4. require_once "../public/_pdo.php";
  5. require_once '../public/load_lang.php';
  6. require_once '../public/function.php';
  7. global $PDO;
  8. PDO_Connect("sqlite:" . _FILE_DB_TERM_);
  9. $query = "select word,meaning , owner from term where 1 order by create_time DESC limit 0,4";
  10. $Fetch = PDO_FetchAll($query);
  11. foreach ($Fetch as $row) {
  12. echo '<div class="card">';
  13. echo '<div class="title"><a href="../wiki/wiki.php?word=' . $row["word"] . '">' . $row["word"] . '</a></div>';
  14. echo '<div class="summary">' . $row["meaning"] . '</div>';
  15. echo '<div class="author">' . $row["owner"] . '</div>';
  16. echo '</div>';
  17. }