Documentation

medoo_paginate
in package

<code> 类似淘宝分页

$paginate = new medoo_paginate($row->num,1); $paginate->url = $this->url; $limit = $paginate->limit; $offset = $paginate->offset;

$paginate = $paginate->show();

.pagination li{ list-style: none; float: left; display: inline-block; border: 1px solid #ff523b; margin-left: 10px; width: 40px; height: 40px; text-align: center; line-height: 40px; cursor: pointer; } .pagination .active{ background: #eee; border: 1px solid #000; }

Table of Contents

Properties

$class  : mixed
$count  : mixed
$get  : mixed
$limit  : mixed
$offset  : mixed
$page  : mixed
$pages  : mixed
$query  : mixed
$size  : mixed
$url  : mixed

Methods

__construct()  : mixed
构造函数
next()  : mixed
show()  : string
显示分页 pagination
url()  : string
生成URL函数,如有需要,可自行改写 调用函数 ($url,$par);

Properties

Methods

__construct()

构造函数

public __construct(mixed $count[, mixed $size = 10 ]) : mixed
Parameters
$count : mixed
$size : mixed = 10

next()

public next([mixed $class = 'pagination' ]) : mixed
Parameters
$class : mixed = 'pagination'

show()

显示分页 pagination

public show([string $class = 'pagination' ]) : string
Parameters
$class : string = 'pagination'
Return values
string

url()

生成URL函数,如有需要,可自行改写 调用函数 ($url,$par);

public url(string $url[, string $par = [] ]) : string
Parameters
$url : string
$par : string = []
Return values
string
✖ Error 404 while fetching file: ✖ Error 404 while fetching file: 
On this page

Search results