定制PHP分页类

原生php制作分页函数 话不多说,直接上代码: 创建page.php文件,保存分页代码 <?php //分页 /* 调用:page(数据总条数,每页显示的数据条数数,要展示的页码按钮数,分页参数名) 返回:array('limit','html') $count 数据总条数 $num 每页显示的数据条数数 $page 分页参数名 $btn_num 要展示的页码按钮数 */ function pa... 阅读详情

这个分页类完全是根据我的需要写的,但可以稍加修改变成一个通用的,在处理显示数据时完全可以引入smarty模板,根据传入的数据类型,进行相应的显示,当然还可以印日一个参数指定显示的类型,比如传入ul,table,更或者border

传入的参数是原数据(以数组的形式)和需要分页的URL($_SERVER['PHP_SELF'])

<?php
/*唯一的参数是控制器传过来的数据,数据的形式以数据传递,可以作为一个通用分页类*/
class Rollpage
{
	//分成多少页
	private $page_total;
	//分页大小
	private $page_size = 15;
	//被分页的页面地址
	private $page_link;
	//当前页
	private $page_current ;
	//需要被分页的数据,这里是对数组进行分页
	private $words;
	//整体翻页大小
	private $rollpage_size=10;
	
	//首页
	private $home;
	//尾页
	private $end;
	//共有多少页
	private $total;
	
	private $link='';
	private $pos;
	private $nagv;
	private $table='';
	public function __construct($words, $href)
	{
		$len = count($words);
		$this->words=$words;
		$this->page_total = ($len > 0)? ceil($len/$this->page_size):0;
		$this->page_link=$href;
		//if ...else 语句进行边界检测
		$this->check();
	}
	private function check()
	{
		if(!isset($_GET['offset']))
		{
			$this->page_current=1;
		}
		else
		{
			$offset = $_GET['offset'];
			if($offset > $this->page_total)
			{
				$this->page_current = $this->page_total;
			}
			else if($offset < 1)
			{
				$this->page_current = 1;
			}
			else
			{
				$this->page_current = $offset;
			}
		}
	}
	
	//分页数据
	private function data()
	{
		return array_chunk($this->words, $this->page_size)[$this->page_current-1];
	}
	//首页
	private function home()
	{
		$this->home = "<a href =".$this->page_link."?offset=1 style='text-decoration:none ;'>首页</a> ";
	}
	//尾页
	private function end()
	{
		$this->end = "<a href ='".$this->page_link."?offset=".$this->page_total." '  style='text-decoration:none ;' >尾页</a>   ";
	}
	//总页数
	private function total()
	{
		$this->total="共有<span style='color:#eeabf0;'>".$this->page_total."</span>页";
	}
	//创建分页链接,当前页禁用<a>..</a>并突出显示
	private function link()
	{
		if($this->page_total > $this->rollpage_size)
		{
			//根据分页大小,当分页总数大于10页时,每次显示10页内容
			$start = floor(($this->page_current-1)/$this->rollpage_size)*$this->rollpage_size+1;
			$end = $start+$this->rollpage_size;
			//整体向上翻10页
			if($this->page_current > $this->rollpage_size)
			{
				$offset = $start-1;
				$this->link .= "<a href='{$this->page_link}"."?offset={$offset}' "." style=\"text-decoration:none\" > ".'<<<'."<a> ";
			}
			//整体翻十页关键代码
			for($start; $start < $end; $start++)
			{
				if($start < $this->page_total)
				{
					if($this->page_current == $start)
					{
						$this->link .= "<span style='text-decoration:none; font-size: 19px; color: white;' >".$start."</span> ";
					}
					else
					{
						$this->link .= "<a href='{$this->page_link}"."?offset={$start}' "." style=\"text-decoration:none\" >".$start."<a> ";
					}
				}
				
			}
			//根据边界条件,显示上一页
			if($this->page_current > 1)
			{
				$next_page = $this->page_current-1;
				$this->link .= "<a href='{$this->page_link}"."?offset={$next_page}' "." style=\"text-decoration:none\" > ".'上一页'."<a> ";
			}
			if($this->page_current < $this->page_total)
			{
				$next_page = $this->page_current+1;
				$this->link .= "<a href='{$this->page_link}"."?offset={$next_page}' "." style=\"text-decoration:none\" > ".'下一页'."<a> ";
			}
			//整体向下翻10页
			if($end < $this->page_total)
			{
				$this->link .= "<a href='{$this->page_link}"."?offset={$end}' "." style=\"text-decoration:none\" > ".'>>>'."<a> ";
			}
		}
		//根据分页大小,当分页总数小于10页时,显示基本分页信息
		else
		{
			for($i=1; $i <= $this->page_total;$i++)
			{
				//当前页时,突出显示
				if($this->page_current == $i)
				{
					$this->link .= "<span style='text-decoration:none; font-size: 19px; color: white;' >".$i."</span> ";
				}
				else
				{
					$this->link .= "<a href='{$this->page_link}"."?offset=$i' "." style=\"text-decoration:none\" >".$i."<a> ";
				}
			}
		}
	}
	//添加一个跳转表单
	private function pos()
	{
		$this->pos = "<form  action='{$this->page_link}' method='get' style='display: inline;'><input type='text' name='offset' style='width:40px;' > ".
		"<input type='submit' value='跳转' id='submit' style = 'width: 35px; height: 20px ; margin-top: 2px ; padding:1px;' ></form> ";
	}
	//分页信息的头部
	private function header()
	{
		$this->table .= "<div style='margin-left: 400px; margin-top: -18px;'><span style='width: 120px; height:30px; background-color: #a00000; color: #00a000; font-size: 18px;'>查询历史</span><span style='width: 120px; height:30px;  margin-left: 10px ;background-color: #a00000;  font-size: 18px;'><a href='./review/reviewWord.html' target='_blank'  style='text-decoration:underline;color: #00a000; '>复习单词</a></span></div>";
		
		$this->table .= "<table style=' width: 720px;  margin-left: 400px; border: 1px solid gray; padding-left: 80px;'>";
	}
	//分页主体
	private function table()
	{
		$this->header();
		$word = $this->data();
		$len = count($word);
		for($i=0; $i < $len; $i = $i+3)
		{
			$one = isset($word[$i]) ? $word[$i] : "";
			$two = isset($word[$i+1]) ? $word[$i+1] : "";
			$three = isset($word[$i+2]) ? $word[$i+2] : "";
			$this->table .= "<tr>";
			$this->table .= "<td>".$one."</td>"."<td>".$two."</td>"."<td>".$three."</td>";
			$this->table .= "</tr>";
		}
		$this->table .= "</table>";
		
	}
	//用户接口,生成分页信息
	public function getLink()
	{
		$this->home();
		$this->end();
		$this->total();
		$this->link();
		$this->pos();
		$this->table();
		$this->nagv = $this->home.$this->link.$this->end.$this->pos.$this->total;
		echo $this->table;
		echo "<div style='margin-left: 400px; width: 720px; margin-top: 2px;' >".$this->nagv."</div>";;
	}
}
?>


RT-Thread stm32h7使用串口DMA stm32h7在rtthread中无法使用串口DMA,通过更改驱动代码使其支持串口DMA 阅读详情

相关推荐

virtualbox虚拟机里面最顶部没有控制、设置和帮助等选项

无意中操作,导致virtualbox虚拟机里面最顶部没有控制,设置和帮助选项  virtualbox虚拟机窗口显示如下如: 如何设置,窗口显示如下图所示呢: virtualbox虚拟机窗口模式显示设置,切换可以通过如下图所示操作进行切换: PS:一定要是右边的Ctrl+C

WEL测试 8780

php google baidu 分页

php google baidu 分页/**作者:潇湘博客 http://blog.youkuaiyun.com/fkedwgwy时间:2009-11-26php技术群:37304662使用方法:include_oncePager.class.php;$pager=new Pager();if(isset($_GET[page]))$

潇湘博客 1027

别再为3D抓取发愁了!Halcon手眼标定保姆级教程(Eye-to-Hand模式,含完整代码)

本文提供Halcon手眼标定的保姆级教程,详细讲解Eye-to-Hand模式下的3D抓取实现方法。从硬件配置、坐标系系统到标定流程和核心算法,涵盖完整代码和实战经验,帮助用户快速掌握工业自动化中的精准抓取技术。

weixin_42523711的博客 270

php通用分页类

思路还是比较简单的,传入你需要被分页的地址,返回分页的数据和分页导航条......... 对数据库的操作,比如 主机名,数据库名,数据表名,用户名,密码,编码等可以写入在一个php配置文件里。 随便修改一下就行了 <?php class Rollpage { //有多少条数据 private $total_items; //分页数 privat

Free_Program_1314的专栏 969

通过CN3口直接控制台达伺服电机A2-M(二)

既然可以通过RS485与伺服驱动器进行通讯,那么就肯定可以控制转速 首先,需要了解下 ‘控制模式及控制命令输入源设定’ 依据以上资料,速度控制模式有两种,S和SZ模式,分别对应模式选择中的02和04,对P1-01的地址0102进行写地址操作即可实现,一开始我使用了S模式,但是这个模式在寸动模式下会自动运转,不符合我控制的要求,后面改用SZ模式,就可以实现零速度。 使用串口工具发送命令:“01 06 01 02 00 04 28 35”即可以实现设置,设置完成后可以手动在伺服驱动器的按键面板上进行确

HKing_evil的博客 6825

二维卡尔曼滤波位置,速度融合

这里写自定义目录标题欢迎使用Markdown编辑器新的改变功能快捷键合理的创建标题,有助于目录的生成如何改变文本的样式插入链接与图片如何插入一段漂亮的代码片生成一个适合你的列表创建一个表格设定内容居中、居左、居右SmartyPants创建一个自定义列表如何创建一个注脚注释也是必不可少的KaTeX数学公式新的甘特图功能,丰富你的文章UML 图表FLowchart流程图导出与导入导出导入 欢迎使用Ma...

Johnlee2019的博客 8451

PHP通用分页类

大多数程序都会用到分页这一功能,所以为了以后方便花了近一个小时封装了一个通用的PHP分页类。 <?php require_once "../PublicService/WebHelper.class.php"; ?> 测试 #diva a{ width:10px;height:10px; padding:10px;} ">返回首页

vs2008ASPNET的专栏 5404

Mplus—交叉滞后面板模型(Cross-Lagged Panel Model, CLPM)

本文介绍交叉滞后模型相关知识,以及显变量模型与潜变量模型在Mplus中的语法。

m0_54401011的博客 1万+

php分页思路

<?php class page{ public $nowPage=1; public $perPage=10; public $showPage=10; public $totalPage; private $startPage=1; private $endPage; private $pageNum;...

L13976396108的博客 196

SVA学习笔记(1)——property基本语法及巧用define与property

巧用define与property,让代码更加灵活

craftsman2018ship的博客 1574

MATLAB - 激光雷达 - 相机联合标定(Lidar-Camera Calibration)

激光雷达传感器和相机通常在自动驾驶应用中结合使用,因为激光雷达传感器收集三维空间信息,而相机则以二维图像捕捉空间的外观和纹理。您可以融合来自这些传感器的数据来改进物体检测和分类。激光雷达-相机标定可以估算出一个变换矩阵,给出两个传感器之间的相对旋转和平移。在进行激光雷达-相机数据融合时,您可以使用该矩阵。本图说明了激光雷达和相机标定 (LCC) 过程的工作流程,我们使用棋盘格作为标定对象。我们从激光雷达和相机数据中提取棋盘角和平面,然后在它们的坐标系之间建立几何关系,进行标定。

机器人控制与仿真应用 7371

PHP分页类

分页类1: <?php /** * 分页类 * * 调用方式: * $p=new Page(总条数,显示页数,当前页码,每页显示条数,[链接]); * print_r($p->getPages()); //生成一个页码数组(键为页码,值为链接) * echo $p->showPages(1); //生成一个页码样式(可添加自定义样式) * */ /* 总条数,需要显示的页数,当前页,每页显示的条数,连接 生成一个一维数组,键为页码 值为连接 返回一个生成好样式的页码(并且

outread's blog 491

【学习系列】SAP RAP 3:添加多层级的子节点

本文详细介绍了在SAP ABAP RAP开发中如何创建多层级业务对象。主要内容包括:1)创建明细和计划行层级的数据库表及CDS视图;2)使用association和composition关键字建立父子关联关系;3)创建各层级的投影视图并设置层级关系;4)更新行为定义,添加关联、操作权限等控制;5)更新服务定义公开新增视图;6)创建元数据扩展优化UI展示。通过这一系列步骤,实现了从抬头到明细再到计划行的完整业务对象层级结构,为后续UI功能扩展奠定了基础。

DeveloperMrMeng的博客 587

自己写的一个php分页类,支持onclick和详细定制参数

调用echo page::html(array('rows' => $rowCount, 'nums' => 6, 'countsL' => '共', 'countsR' => '条记录', 'timeA' => microtime(1))); 效果1共259条记录耗时0毫秒---------------------代码----------------------class page {    p

我的笔记 678

WINCC7.3破解文件

WINCC7.3硬件够破解文件,有需要的下载!WINCC7.3硬件够破解文件,有需要的下载!

android 蓝牙通讯demo

android 下蓝牙通讯demo,实现了发现蓝牙,使能蓝牙,通过蓝牙发送消息。

ajax分页类 php,一个支持AJAX的PHP分页类

一个PHP分页类,支持AJAX方式的PHP分页代码,可以增加相应的风格,含有出错处理,只需载入相应参数,就可输出页码信息,青岛星网下面跟大家分享具体代码。一个支持AJAX的PHP分页类...

weixin_30411455的博客 225

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

封装php分页类

最近在用phalcon写一个支持多国语言的cms,不太喜欢phalcon的分页,所以自己写了个分页工具类。 该分页类支持自动获取解析url,还支持高度自定义 例如: 自定义分页参数名 自定义选中页、禁用页的class值 自定义首页、上一页、左边页、当前页、右边页、下一页、后缀 自定义各按钮位置 自定义左边或右边显示按钮个数 自定义替换规则 自定义是否显示无效按钮(首页、上一页、下一页、尾页...

赵阳的博客 4225

Probability and Statistics - 4th edition

Probability and Statistics - 4th edition

php完整的分页类_php分页类_你不可错过的一个php分页类

摘要 腾兴网为您分享:你不可错过的一个php分页类,作业盒子,小度音响,铜仁党建,速用钱等软件知识,以及方正证券小方,应用盒子,hpm227打印机驱动,必应搜索引擎,e购贷,百度云直播,变老,五十音图app,环球卓越,职称英语考试成绩,fgobilibili,国家中小学网络,英选,英雄联盟英雄升级,仓单交易等软件it资讯,欢迎关注腾兴网。又一个php+mysql的分页类,三个参数:mysql_q...

weixin_33595317的博客 165

php的分页类代码下载,仿Aspnetpager的一个PHP分页类代码 附源码下载

基本逻辑思路和.net的一样,就是将通过实体类来进行配置换成了通过数组进行配置,逻辑比较简单,根据条件判断拼接分页html。有以下几个简单的功能:1:支持相关按钮的显示与否配置2:支持每页数目,文本名称,html标签类名称的自由配置3:支持url重写过的页面(需自己在配置数组中添加重写规则)简单吧,还是直接上代码:核心代码:pager.class.phpclass pager{//分页的参数配置p...

weixin_36285826的博客 142

PHP 分页类

//用法1: echo Page::instance(32,10,...

weixin_34204722的博客 91

php最原始的分页代码和样式,PHP自适应分页代码,可以灵活定制CSS样式和分页链接效果!...

原创! 无 ?php/** * 可以灵活定制的分页类 * * 可以定制的选项包括,分页链接显示效果,当前页码链接按钮的样式,URL中获取分页值的名字,可以随意带自己的参数 * * 使用方法: * 1、初始化类的时候需要传入参数,类型为数组。 * array( * (必填)'totalRows'原创!/*** 可以灵活定制的分页类** 可以定制的选项包括,分页链接显示效果,当前页码链接按钮的样式,U...

weixin_39969028的博客 194

php分页类 下载,仿Aspnetpager的一个PHP分页类代码 附源码下载

基本逻辑思路和.net的一样,就是将通过实体类来进行配置换成了通过数组进行配置,逻辑比较简单,根据条件判断拼接分页html。有以下几个简单的功能:1:支持相关按钮的显示与否配置2:支持每页数目,文本名称,html标签类名称的自由配置3:支持url重写过的页面(需自己在配置数组中添加重写规则)简单吧,还是直接上代码:核心代码:pager.class.phpclass pager{//分页的参数配置p...

weixin_39873177的博客 110

PHP分页类源码

1 <?php 2 /** 3 file: page.class.php 4 完美分页类 Page 5 */ 6 class Page { 7 private $total; //数据表中总记录数 8 ...

aipmunj7655的博客 166

php无限极分页,两款超php分页类代码_PHP教程

两款超php教程分页类代码mode:2'.$page->show(2);* echo 'mode:3'.$page->show(3);* echo 'mode:4'.$page->show(4);* 开启ajax:* $ajaxpage=new page(array('total'=>1000,'perpage'=>20,'ajax'=>'ajax_page',...

weixin_36484814的博客 272

一个很好用的php分页类

class Page { // 分页栏每页显示的页数 public $rollPage = 6; // 页数跳转时要带的参数 public $parameter ; // 默认列表每页显示行数 public $listRows = 20; // 起始行数 public $firstRow ; // 分页总页面数 pr

just do IT 4335

分页类

<?php /** file: page.class.php 完美分页类 Page */ class Page { private $total; //数据表中总记录数 private $listRows; ...

weixin_34010566的博客 66

gitpage+php,GitHub - ITzhiwei/page: PHP分页类库 支持ajax模式和普通跳转模式

PHP分页类库,支持ajax模式和普通的跳转模式,内含demo例子介绍没有任何依赖,可在任何环境下使用,开箱即用简单灵活好用,多个样式可选,支持 ajax 模式 和 普通的跳转模式,如:[?|&]page=1 和 pathInfo /page/1 等模式点击跳转分页时不会漏掉其他url原有的参数安装方式1:使用 composer 命令安装:composer require tcwei/pa...

weixin_36226933的博客 299
上一篇: php实现图片加水印
下一篇: php图片上传并生成缩略图
错_对
博客等级 码龄16年 68粉丝 80原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值