纳维加多尔港
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了纳维加多尔港相关的知识,希望对你有一定的参考价值。
<?php function browser_info($agent=null) { // Declare known browsers to look for 'konqueror', 'gecko'); // Clean up agent and build regex that matches phrases for known browsers // (e.g. "Firefox/2.0" or "MSIE 6.0" (This only matches the major and minor // version numbers. E.g. "2.0.0.6" is parsed as simply "2.0" ')[/ ]+(?<version>[0-9]+(?:.[0-9]+)?)#'; // Find all phrases (or return empty array if none found) // Since some UAs have more than one phrase (e.g Firefox has a Gecko phrase, // Opera 7,8 have a MSIE phrase), use the last one found (the right-most one // in the UA). That's usually the most correct. 'browser' => $matches['browser'][$i], 'version' => $matches['version'][$i]); } //get browser info $ua = browser_info(); //show what's returned if($ua['browser'] === "safari"){ $var = 2; } elseif($ua['browser'] === "msie"){ $var = 1; } elseif($ua['browser'] === "firefox"){ $var = 1; } ?>
以上是关于纳维加多尔港的主要内容,如果未能解决你的问题,请参考以下文章