• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.