Codeigniterinputpost Chinese cannot be submitted through $ this-& gt; input-& gt; post ('name ') cannot submit Chinese characters. if name = 'en', yes. if name = 'Chinese', No, it may be that the php page you received is inconsistent with the HTML page code of the sent data. codeigniter input post cannot be submitted in Chinese.
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; }