Use PHP to detect whether the browser currently used by the user is IE_PHP Tutorial

WBOY
Release: 2016-07-13 17:18:02
Original
872 people have browsed it

Copy code The code is as follows:

/**
* Detect the user’s current browser
* @return boolean whether it is Internet Explorer
*/
function chk_ie_browser() {
$userbrowser = $_SERVER['HTTP_USER_AGENT'];
if ( preg_match( '/MSIE/i', $userbrowser ) ) {
$usingie = true;
} else {
$usingie = false;
}
return $usingie;
}

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/621704.htmlTechArticleCopy the code The code is as follows: /*** Detect the user's current browser * @return boolean whether it is IE browser*/ function chk_ie_browser() { $userbrowser = $_SERVER[ 'HTTP_USER_AGENT']; if ( pre...
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!