Link solution in include

Source: Internet
Author: User
The link in include is displayed by page on the main interface. how can I implement the page number hyperlink ?, Encapsulate pages into classes or functions. Alternatively, you can find a pre-existing page on the Internet to encapsulate your database connection into a string. You can write a total. Links in each include
Ladies and gentlemen, I used include to reference a PHP interface on the main interface, which is displayed by page, but how should I implement the page number hyperlink?

------ Solution --------------------
Encapsulate pages into classes or functions. Alternatively, you can find an existing page on the Internet.
------ Solution --------------------
Encapsulate the connection of your database into a string. You can write a total. The method that can be called every time you need it.
PHP code
Private function setpagestr () {$ temstr = ""; if ($ this-> curpage> 1) {$ temstr. = 'pageurl. '"> homepage pageurl. '&'. PAGECUT. '= '. ($ this-> curpage-1 ). '"> '. $ this-> pre_str. '';} if ($ this-> curpage <$ this-> gettotalepage () {$ temstr. = 'pageurl. '&'. PAGECUT. '= '. ($ this-> curpage + 1 ). '"> Next Page'; $ temstr. = 'pageurl. '&'. PAGECUT. '= '. ($ this-> gettotalepage ()). '"> last page';} $ temstr. = 'current name '. $ this-> curpage. 'page/col '. $ this-> gettotalepage (). 'page col '. $ this-> totalerows. 'records '; $ this-> pagestr = $ temstr ;}
------ Solution --------------------
The include referenced PHP interface on the main interface has been integrated with the main interface

When the page number is clicked on the main interface, the page is actually transferred to the main interface, which can be obtained normally on the reference interface.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.