简单好用的php分页类
<?php /**
* page.class.php 分页类
* 日期:2015-04-05
* http://aowana.sinaapp.com
*/
class page
{
public static $url;
public static $page;
public static $total;
public static $size;
public static $number;
public static $max;
public static $action = array('previous', 'number', 'next');
public static function show($url, $page, $total, $size=10, $number=11)
{
self::$url = $url;
self::$page = $page;
self::$total = $total;
self::$size = $size;
self::$number = $number;
self::$max = ceil($total / $size);
$str = '';
foreach (self::$action as $name)
$str .= self::$name();
return $str;
}
public static function first()
{
if (self::$page > 2)
{
$url = self::url(1);
return "
php免费学习视频:立即使用
踏上前端学习之旅,开启通往精通之路!从前端基础到项目实战,循序渐进,一步一个脚印,迈向巅峰!










