August 6, 201214 yr Good Morning all. I am currently in development of my employers new website, I have used several jquery plugins one of which being a border radius plugin. When i have this plugin installed several things on the website do not work with internet explorer 7 and 8 so what iw ould like to do, is with php detect the browser, if its internet explorer 7 or 8, include header1.php if its anything else, include header2.php? Can anyone advise Thanks in advance. Craig
August 6, 201214 yr Author na because ive got to exclude files and include other files and js within the header document
August 6, 201214 yr Something like this. I got the user agent string from here: http://blogs.msdn.com/b/ie/archive/2009/01/09/the-internet-explorer-8-user-agent-string-updated-edition.aspx <?php if($_SERVER['HTTP_USER_AGENT'] == 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0)') : // it's IE8 on Win7 else : // it's something else endif;
August 6, 201214 yr Author if($_SERVER['HTTP_USER_AGENT'] == 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 6.1; Trident/4.0)') include 'Includes/Header.php'; else { include 'Includes/IE_Header.php'; }; ok put this in and edited my headers. not working, any suggestions? Thanks Craig
Create an account or sign in to comment