- - fields->tooot ? $this->fields->tooot : 'https://bbapi.ima.cm'; - -// 获取当前页码,默认为第一页 -$page = isset($_GET['page']) ? (int)$_GET['page'] : 1; - -// 每页显示的数量 -$limit = 20; - -// 计算偏移量 -$offset = ($page - 1) * $limit; - -// 使用 file_get_contents 获取数据 -$data = file_get_contents($tooot); -$toots = json_decode($data, true); - -// 只获取当前页的数据 -$tootsToShow = array_slice($toots, $offset, $limit); - -// 初始化 Parsedown -$parsedown = new Parsedown(); -?> - - - - - - - - - - - - - - text($toot['content']); ?> - - - - - - - - - - - - - - - 加载更多 - - - - -