$page = isset($data['page']) ? $data['page'] : 1; $page = intval($page); $limit = isset($data['rows']) ? $data['rows'] : 15; $limit = intval($limit); $start = $limit * ($page - 1); $list=array_reverse($backup->get_filelist());//将信息由新到老排序 $count=count($list); $alist=array_slice($list,$start,$limit,false);//分页 return $this->json_data($count, $alist);