Mobile version of site using CodeIgniter

后端 未结 4 1194
-上瘾入骨i
-上瘾入骨i 2021-01-13 22:23

What I want to do is to create a mobile version of my web site in CodeIgniter.

I want to redirect my complete web site to m.example.com

There will be no chan

4条回答
  •  深忆病人
    2021-01-13 23:10

    The user agent class has a function;

    $this->agent->is_mobile();
    

    You could use this in the construct of your base controller(s) to test if mobile.

提交回复
热议问题