Home > Backend Development > PHP Tutorial > Eight-page list example_PHP tutorial

Eight-page list example_PHP tutorial

WBOY
Release: 2016-07-13 17:24:30
Original
901 people have browsed it

$conn = @mysql_connect(localhost:3306,test,test); include_once "js.class.php"; include_once "pager.class.php"; include_once "whxbb.class.php"; include_once "whxbb_article.class.php"; // 以上代码最好全放在一个包含文件中 /* 分页显示文章列表,每页10条 */ $article = new WHXBB_Article(); $info = $article->GetNInfo(10, $page); $pager = $article->pager; if (WHXBB::isError($info)) new WHXBB_Error("Failed to read article information, please try again later", 1 , WHXBB_ERROR_ECHO); else if($info == 0) new WHXBB_Error("There is no information you need", 2, WHXBB_ERROR_ECHO); else { for ($i = 0; $i
">=$arr[title]?> - Author: =$arr[author]?>
} } if (WHXBB::isPager($pager)) { echo " 共" . $pager->infoCount . "records"; echo "total" . $pager->pageCount . "page"; echo "current page:" . $pager->pageNo; if ($pager->pageNo != 1) echo "Homepage"; if ($pager->GotoPrevPage()) echo " prevPageNo . ">Previous page"; if ($pager->GotoNextPage()) echo " nextPageNo . ">Next page"; if ($pager->pageNo != $pager->pageCount) echo " pageCount . ">Last page"; } @mysql_close($conn); ?>

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/532127.htmlTechArticleGetNInfo(10, $page); $pager = $article->pager; if (WHXBB::isError( $info)) new WHXBB_Error(Failed to read article information, please try again later, 1, WHXBB_ERROR_ECHO); else if($info == 0) n...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template