Thinkphp page number is not displayed (data is sufficient) public function trends (){
$ Showtrends = M ('Trends ');
Import ('org. Util. page ');
$ Showscount = $ showtrends-> count ();
$ Page = new Page ($ trendscount, 3 );
$ Show = $ Page-> show ();
$ List = $ showtrends-> limit ($ Page-> firstRow. ','. $ Page-> listRows)-> select ();
$ This-> assign ('Trends ', $ list );
$ This-> assign ('page', $ show );
// Dump ($ show );
// Exit ();
$ This-> display ();
}
The paging effect is available, but the page number is not displayed. the dump ($ show) data is empty. why?
Reply to discussion (solution)
What is the number of TP systems you use? If it is new, your import is invalid because the latest namespaces are used.
What is the number of TP systems you use? If it is new, your import is invalid because the latest namespaces are used.
I use 3.1, but fuzzy paging query can be implemented in another controller, and it won't work here
The other one can, but this cannot.
Apparently, you have something wrong! If the process is normal, the parameter is incorrect. Is the template correct?
Using the features provided by TP, you only need to follow the format, there is no place to debug (Dummies)
Set $ Page = new Page ($ trendscount, 3 );
Change to $ Page = new Page ($ showscount, 3 );
Set $ Page = new Page ($ trendscount, 3 );
Change to $ Page = new Page ($ showscount, 3 );
Oh, wrong variable. thank you.