display('index.tpl'); //讀出所有文章 function list_article() { global $db, $smarty; $sql = "SELECT * FROM `article` ORDER BY `update_time` DESC"; $result = $db->query($sql) or die($db->error); $all = []; while ($data = $result->fetch_assoc()) { $all[] = $data; } // die(var_export($all)); $smarty->assign('all', $all); } ```
進階搜尋
55人線上 (11人在瀏覽線上書籍)
會員: 0
訪客: 55