pdo分页
$dsn = "mysql:host=localhost;dbname=bbv1";
$db = new PDO($dsn,'root',''); //pdo链接
$num = 10; //每页显示的文章数目
$pagea=($page-1)*$num;
foreach ($db->query("SELECT * from article Limit $pagea,$num") as $row)
{
echo "
";
print_r("删除");
print_r($row[1]);
print_r($row[2]);
print_r($row[3]);
}
$rs = $db->query("select COUNT(*) from article"); //取得数据总数
$count = $rs->fetchColumn();
$pagenum = ceil($count/$num);
?>
添加文章
文章总数:
文章总页:
For($i=1;$i
$show=($i!=$page)?"$i":"$i";
Echo $show." ";
}
$db=null;
?>

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

SublimeText3 Chinese version
Chinese version, very easy to use

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.