After the CI framework is used to search for Chinese characters, an error occurs in searching for Chinese pages by page. for PHP processing code, I am posting the following to ask the moderator for help:
Member List */public function member_list () {// member list $ this-> userdoaction_model-> getPower (MBMBERPOWER, $ this-> userinfo, POWER1 ); $ this-> load-> language ('admin/member'); $ condition ['display'] = 15; $ data ['Lang '] = $ this-> lang-> line ('htmlages '); $ data ['option'] = $ this-> group_model-> getgroupmemberNM (); $ data ['options'] = array ('null' => $ data ['Lang '] ['space'], '1' => $ data ['Lang '] ['s'], '0' => $ data ['Lang '] ['E']); // sort ($ data ['option']); // $ this-> load-> library ('pagination '); // $ config = $ this-> config-> item ('page'); // $ config ['base _ url'] = base_url (). $ data ['Lang '] ['memberlist']; urlencode ($ kw) if ($ this-> input-> post ('dospost ')) {$ condition = array ('group _ id' => $ this-> input-> post ('gid '), 'username' => $ this-> input-> post ('Username'), 'status' => $ this-> input-> post ('status ')); // print_r ($ Sel); $ gid = $ this-> input-> post ('gid '); $ status = $ this-> input-> post ('status'); $ username = urlencode ($ this-> input-> post ('Username ')); $ condition ['display'] = 15; $ num = $ this-> member_model-> Selcount ($ condition); $ url = base_url (). "/index. php/admin/member_list/"; $ this-> page-> select = $ gid. "_". $ status. "_". $ username; $ this-> page_model-> page ($ num, "15", 1, $ url ); $ data ['gid'] = $ this-> input-> post ('gid '); $ data ['username'] = $ this-> input-> post ('Username '); $ data ['status'] = $ this-> input-> post ('status'); $ data ['Page'] = $ this-> page-> pagenav; $ data ['user'] = $ this-> member_model-> Selmember ($ condition);} else {error_reporting (E_ALL ); $ num = $ this-> member_model-> countlist (); $ url = base_url (). "/index. php/admin/member_list/"; $ this-> page-> select = '0 _ null_0 '; $ this-> page_model-> page ($ num," 15 ", 1, $ url); $ data ['Page'] = $ this-> page-> pagenav; // print_r ($ condition ); $ data ['user'] = $ this-> member_model-> member_list ($ condition);} $ this-> load-> view ('admin/member_list ', $ data );
Reply to discussion (solution)
@ Xuzuning
Can someone help me?
Check its error message.
$ Total_rows variable not defined
Check its error message.
$ Total_rows variable is not defined. I am at the beginning of the variable + @
The main problem is that an error occurred while passing the Chinese character parameter (thank you for answering this question many times)
Your code is not fully pasted, and the error prompt is also posted.
Solved!
Iconv sometimes becomes invalid! Use the following code:
$ A = urldecode ("% E5 % 90% 89% E6 % 9E % 97 ");
$ A = mb_convert_encoding ($ a, 'gb2312', 'utf-8 ');
Echo $;
?>