PHP code example of lipowei / page
1. Go to this page and download the library: Download lipowei/page library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
lipowei / page example snippets
例子2 ajax 模式:请到 demo-ajax 中查看完整示例
ajax 模式
$pageClass->isAajx = true;
//前端进行ajax分页请求数据的函数名,需要前端定义该函数; 要在 ajax 的回调内执行 pageAjaxLock = true; 进行解锁,解锁后才能进行下一次ajax分页触发,这是防止用户多次重复点击
$pageClass->ajaxFunctionName = 'getList()';
//假设有100列数据
$totle = 100;
$pageHtml = $pageClass->getPageHtml($totle);