Welcome Guest, Not a member yet? Register   Sign In
how to swich for compitable browser (css)
#1

[eluser]Unknown[/eluser]
controllers/browser.php
WARNING, just theory and syntax are not correct.

Code:
class first extends Controller
{
    function index()
    {
        if ( safari == $http_browser) {
        $this->load->view('safari', $data);
        }elseif ($firefox == $http_browser)
        {
        $this->load->view('firefox', $data);
        }
    }
}

hmm. is that correct and possible what I mean. Should I add a more command line?

kelvin
#2

[eluser]Jamie Rumbelow[/eluser]
You can detect the browser by using CodeIgniter's User Agent Library..




Theme © iAndrew 2016 - Forum software by © MyBB