基于Jquery的瀑布流
时间:2021-07-01 10:21:17
帮助过:4人阅读
基于Jquery的瀑布流
-
- AJAX
-
-
-
-
-
- $page = isset($_GET['page']) ? intval($_GET['page']) : 1;
- $size = 20;
- try
- {
- $pdo = new PDO('mysql:host=localhost;dbname=wechatbook', 'root', 'root');
- $offset = ($page - 1) * $size;
- $sql = "SELECT title FROM wcb_rss_news limit $offset,$size";
- $stmt = $pdo->query($sql);
- $stmt->setFetchMode(PDO::FETCH_ASSOC);
- $list = $stmt->fetchAll();
- if (!empty($list))
- {
- foreach ($list as $row)
- {
- ?>
- = $row['title'] ?>
- }
- }
- else
- {
- echo '';
- }
- }
- catch (PDOException $e)
- {
- }
- ?>
- 下一页
|