TP framework issue. The second post will help you! Why is the word "homepage" not displayed?
$ Counts = $ stars-> count ();
$ Page = new \ Think \ Page ($ counts, 10); // instantiate the paging class, the total number of incoming records and the number of records displayed on each Page (25)
$ Page-> lastSuffix = false; // The total number of pages not displayed on the last Page
$ Page-> setConfig ('header ','
% NOW_PAGE %/% TOTAL_PAGE % page');
$ Page-> setConfig ('first ', 'homepage ');
$ Page-> setConfig ('prev', 'Previous page ');
$ Page-> setConfig ('next', 'next ');
$ Page-> setConfig ('last', 'Last page ');
$ Page-> setConfig ('theme ',' % FIRST % UP_PAGE % HEADER % DOWN_PAGE % END % ');
$ Show = $ Page-> show (); // display the output by Page
$ Data = $ stars-> order ('uptime asc ')-> limit ($ Page-> firstRow. ','. $ Page-> listRows)-> select (); // query paging data
$ This-> assign ('page', $ show); // value-assigned paging output
$ This-> assign ("photoshow", $ data );
$ This-> display ("Index: twohundred ");
}
}
Reply to discussion (solution)
The template does not contain the first variable.
What should I do if I want to get the result of the word "homepage ???
But after page 7, the word "homepage" appears. why?
$ Page-> show ();
Go here to find the reason
Brother, how can I find a solution? give me some suggestions!
The TP framework has encountered a paging bug. just go in and track it and fix it.
Code okay
Reference: http://www.thinkphp1.cn/topic/29375.html
But after page 7, the word "homepage" appears. why?
The homepage appears on the page on which you can start with this parameter.
Tp paging source code
'% FIRST % UP_PAGE % HEADER % DOWN_PAGE % END %' add % LINK_PAGE %.