$_POST empty on utf-8 characters

前端 未结 4 684
伪装坚强ぢ
伪装坚强ぢ 2020-12-03 15:27

I\'m working on a multilingual site with CodeIgniter. There is a form that posts data to controller, but $_POST is empty when I start to use Turkish characters

4条回答
  •  被撕碎了的回忆
    2020-12-03 16:15

    Make sure the form tag has accept-charset:

    Then in the controller use utf8_decode() when fetching the posted values:

    $value = utf8_decode($this->input->post('field_name'));
    

提交回复
热议问题