Codeigniterinputpost cannot be submitted in Chinese

Source: Internet
Author: User
Codeigniterinputpost Chinese cannot be submitted through $ this-& gt; input-& gt; post (name) you cannot submit Chinese characters. if name = en, you can submit Chinese characters. if name is Chinese, you cannot submit ------ solution ------------------ may be caused by inconsistent encoding between the received php page and the HTML page for sending data. Var_dump ($ _ POST codeigniter input post Chinese cannot be submitted
You cannot submit Chinese characters through $ this-> input-> post ('name ').
If name = 'en', yes
Cannot submit if name = 'Chinese'

------ Solution --------------------
It may be caused by inconsistent encoding between the received php page and the HTML page for sending data.
Var_dump ($ _ POST );
------ Solution --------------------
Discussion

Reference:

It may be caused by inconsistent encoding between the received php page and the HTML page for sending data.
Var_dump ($ _ POST );

Var_dump ($ _ POST) name => No data

------ Solution --------------------
It is indeed a problem you are talking about. CI only supports the form name attribute in English. Otherwise, Disallowed Key Characters will be reported.
The solution is to change to English, or: http://www.kukaka.org/home/content/576
Methods in Input. php
PHP code
function _clean_input_keys($str)        {                if ( ! preg_match("/^[a-z0-9:_/-]+$/i", $str))                {                        exit('Disallowed Key Characters.');                }                 // Clean UTF-8 if supported                if (UTF8_ENABLED === TRUE)                {                        $str = $this->uni->clean_string($str);                }                 return $str;        } 

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.