Welcome Guest, Not a member yet? Register   Sign In
Detect mobile
#1

[eluser]Unknown[/eluser]
Hello, I'm currently trying to check if the user of my web page is using a mobile or is using a pc.
I'm trying doing this:
Code:
if ($this->agent->is_mobile()){
$this->views_prefix = 'mobile/';
}
else{
$this->views_prefix = 'default/';
}
$this->load->view($this->views_prefix.'default_page');
But when I enter to the page on my android or on my pc the page showed is default/default_page.
What is the problem?
(sorry bad english )
#2

[eluser]InsiteFX[/eluser]
1140 Grid System fluid to mobile




Theme © iAndrew 2016 - Forum software by © MyBB