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.