如何在Codeigniter中显示泰米尔语内容形式的MySQL数据库 [英] How to display Tamil content form mysql database in codeigniter

查看:69
本文介绍了如何在Codeigniter中显示泰米尔语内容形式的MySQL数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在查看使用CodeIgniter从mysql数据库检索的泰米尔语内容时遇到问题。但相同的代码在核心php中工作。我在下面附上了我的代码。请检查我的代码并给出答案是否有任何更改。

I am having problem for viewing the Tamil content which retrive from mysql database using CodeIgniter. but the same code is working in core php. i have attached my code below. please check my code and give answer if any changes.

这是我的查看代码:

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    <table class="table table-striped table-bordered table-hover dataTables-example" >
                <thead>
                <tr>
                    <th>Title</th>
                    <th>Description</th>
                 </tr>
                </thead>
                 <tbody>
                          <?php

                               foreach ($per_results as $result)
                               {

                               ?>
    <tr class="">

                               <td><?php echo $result->title;?></td>
                               <td><?php echo $result->description;?></td>
   </tr>
    <?php
                               }
                               ?>

                          </tbody>

                </table>

这是我的控制器代码:

   public function view_mainhome()
    {
      $data['per_results'] = $this->Login_model->getview_permission();
      $this->load->view('forest_add/view_mainhome',$data);
    }   

这是我的标准代码:

        function getview_permission() //Stock
        {   
        $this->db->select('*');
        $this->db->from('forest_permission');
        $this->db->order_by("per_id", "asc");
        $query = $this->db->get();
         return $query->result();
        }

感谢@

推荐答案

使用以下mysqli函数,我们可以实现100%正常工作

using following mysqli function to we can achieve this 100% worked

 config['set_charset']=array( $db, 'utf8');

替换$ db代替您的db连接变量。

replace $db instead your db connection variable.

这篇关于如何在Codeigniter中显示泰米尔语内容形式的MySQL数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆