[英]Cannot Save native language (Telugu) from Code Igniter to MYSQL database
我正在开发一个 PHP API 和一个 CodeIgniter 网站,我需要发布/获取一个表格到数据库(MYSQL),我为 Android 编写了直接 API,不使用任何框架但工作正常。
PHP API POST 请求代码:
$postDescription = strip_tags($_REQUEST['postDescription']);
$stmtl = $user->runQuery("INSERT INTO posts(postID,userID,postDescription) VALUES('','".$userID."','".$postDescription."')");
CodeIgniter 网站代码:
$data = array('postDescription' => $this->input->post('postDescription'),);
return $this->db->insert('posts', $data);
问题是本地语言的发布数据内容可以很好地插入和访问数据库,但是在从 codeigniter 网站发布时却像这样的内容 ???????? 或显示来自 android 发布内容的数据,如°¤à°¾à°¡à±‡à°ªà°²à±à°²à°¿ à°•à±à°¯à°¾à°‚à°ªà
我需要在 android 和网站之间发布/显示母语内容。
演示网址: http : //arunahospitals.com/
您可以将database->table->column's
Collation 属性更改为utf16/utf32
。 假设您的列名称为“posts”,那么您可以尝试将列“posts”排序规则属性更改为utf16/utf32
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.