Home  >  Article  >  Backend Development  >  php function to get IE browser version

php function to get IE browser version

WBOY
WBOYOriginal
2016-07-25 08:55:571084browse
  1. /*
  2. * Determine whether it is an IE6 browser
  3. * Editor: bbs.it-home.org
  4. */
  5. function isIE6() {
  6. $userAgent = strtolower($_SERVER[" HTTP_USER_AGENT"]);
  7. //Get user browser information from HTTP_USER_AGENT field
  8. if (ereg("msie 6", $userAgent) || ereg("msie 5", $userAgent)) {
  9. return true;
  10. }
  11. return false;
  12. }
Copy code


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn