Welcome Guest, Not a member yet? Register   Sign In
default controller route for mobile
#6

While I'm not a big fan of redirecting mobile browsers and limited functionality on mobile, CI's User_agent library should be perfectly capable of detecting mobile browsers.

PHP Code:
if ($this->agent->is_mobile())

{
    $this->load->view('mobile/home');
}
else
{
    $this->load->view('web/home');

Reply


Messages In This Thread
RE: default controller route for mobile - by mwhitney - 10-05-2015, 10:40 AM



Theme © iAndrew 2016 - Forum software by © MyBB