The front-end page has no content
肆意。
肆意。 2019-03-20 11:31:28
0
0
971

1111

//Paging function

function news($pageNum = 1, $pageSize = 5)

{

$array = array();

$coon = mysqli_connect('localhost',' root','96jj0820com','shuju');

mysqli_set_charset($coon, "utf8");

// limit is how many pieces of information are displayed for the constraint, followed by two parameters, The first is the starting number, the second is the length

$rs = "select * from case limit " . (($pageNum - 1) * $pageSize) . "," . $pageSize ;

$r = mysqli_query($coon, $rs);

while ($obj = mysqli_fetch_object($r)) {

$array[] = $obj ;

}

mysqli_close($coon,"shuju");

return $array;

}

//Display Function of total number of pages

function allNews()

{

$coon = mysqli_connect('localhost','root','96jj0820com','shuju');

mysqli_set_charset($coon, "utf8");

$rs = "select count(*) num from case"; //The total number of pages can be displayed

$r = mysqli_query($coon, $rs);

$obj = mysqli_fetch_object($r);

mysqli_close($coon,"shuju");

return $obj->num;

}

@$allNum = allNews();

@$pageSize = 5; //Agree how many pieces of information are displayed on each page

@$pageNum = empty($_GET["pageNum"])?1:$_GET["pageNum"];

@$endPage = ceil($allNum/$pageSize); / /total pages

@$array = array_reverse(news($pageNum,$pageSize));

?>


foreach($array as $key=>$value){

echo "

";

echo "

";

echo "{$value ->jieshi}";

echo "

";

echo "

";

echo "";

echo "{$value->neirong}";

echo "";

echo "

";

echo "

";

echo "

";

echo "

";

}

?>


1553052627(1).jpg1553052669(1).jpg


肆意。
肆意。

reply all (0)
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!