source/plugin/mobile/mobile.class.php 212行
function global_header_mobile() 方法 返回空
function global_header_mobile() {
return "";
$useragent = strtolower($_SERVER['HTTP_USER_AGENT']);
if(strpos($useragent, 'iphone') !== false || strpos($useragent, 'ios') !== false) {
return lang('plugin/mobile', 'mobile_tip_ios');
} elseif(strpos($useragent, 'android') !== false) {
return lang('plugin/mobile', 'mobile_tip_android');
} elseif(strpos($useragent, 'windows phone') !== false) {
return lang('plugin/mobile', 'mobile_tip_wp7');
}
}
本文介绍了一个用于判断用户设备类型(iOS、Android、Windows Phone)的PHP函数。通过分析用户代理字符串来确定访问者所使用的设备,并据此返回相应的提示信息。
2161

被折叠的 条评论
为什么被折叠?



