ThinkPHP study notes (12) use CommonAction for paging and verification code of ThinkPHP & lt ;? Php/*** in ThinkPHP, * let other actions inherit the current CommonAction. */classCommonActionextendsAct ThinkPHP study notes (12) ThinkPHP paging and verification code usage
CommonAction
PageAction
Count (); $ page = new Page ($ count, 3); // modify the prompt information $ page-> setConfig ('header', "member "); $ page-> setConfig ('prev', "previous Group"); $ page-> setConfig ('next', "next Group "); $ page-> setConfig ('first', "homepage"); $ page-> setConfig ('last', "last page"); // defines the topic style (see the document) // $ page-> setConfig ('theme ',' % '); $ show = $ page-> show (); $ list = $ user-> order ('Id desc')-> limit ($ page-> firstRow. ','. $ page-> listRows)-> select (); $ this-> assign ('title', 'Page Demo'); $ this-> assign ( 'Alist', $ list); $ this-> assign ('page', $ show); $ this-> display ();} function check () {$ verify = $ _ SESSION ['verify ']; if ($ verify! = Md5 ($ _ POST ['verify ']) {$ this-> error ("verification code error") ;}} function next () {}}?>
Index
ID
User name
IP