An error occurred while searching for Chinese characters in the CI framework.

Source: Internet
Author: User
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 $;
?>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.