$this->agent->is_mobile():根据用户代理是否是一个已知的移动设备,返回 TRUE/FALSE (boolean)
模板中可以用:
{if $ci->agent->is_mobile()}
是移动端
{else}
PC端
{/if}
http://codeigniter.org.cn/userguide2/libraries/user_agent.html
http://www.htmltoo.com/