I use SVG Charts on my website. It works in all browsers except IE. I would like to add a snippet of PHP code with a me开发者_Go百科ssage for IE users.
I think I can get the agent info with PHP, but I'm not sure how to detect version. I believe IE 9 supports it now, so I need only for versions below IE 9.
You don't need PHP for this.
Instead, use conditional comments.
Try this : http://php.net/manual/en/function.get-browser.php
You could use the PHP function get_browser
. See here.
The site contains numerous examples of how to detect the browser and display an appropriate message.
Put this around the html
<![if lt IE 9]>
Show stuff to browsers => IE 9
<![endif]-->
<!--[if lt IE 9]>
hide stuff from browsers < IE 9
<![endif]-->
精彩评论