Closed. This question does not meet Stack Overflow guidelines。它当前不接受答案。
想改善这个问题吗?更新问题,以便将其作为on-topic用于堆栈溢出。
6年前关闭。
Improve this question
有没有一种方法可以使用PHP轻松将
所以我的意思是
资料来源:http://theiphonewiki.com/wiki/Models
想改善这个问题吗?更新问题,以便将其作为on-topic用于堆栈溢出。
6年前关闭。
Improve this question
有没有一种方法可以使用PHP轻松将
uname
获得的标识符转换为人类可读的文本?所以我的意思是
iPhone6,1
到iPhone 5S
。 最佳答案
这是我用来将这些标识符转换为设备名称的函数:
function identifierToString($model){
$models = array(
"i386" => "Simulator", //iPhone Simulator
"x86_64" => "Simulator", //iPhone Simulator
"iPhone1,1" => "iPhone 1G", //iPhone 1G
"iPhone1,2" => "iPhone 3G", //iPhone 3G
"iPhone2,1" => "iPhone 3GS", //iPhone 3GS
"iPhone3,1" => "iPhone 4", //iPhone 4 - AT&T
"iPhone3,2" => "iPhone 4", //iPhone 4 - Other carrier
"iPhone3,3" => "iPhone 4", //iPhone 4 - Other carrier
"iPhone4,1" => "iPhone 4S", //iPhone 4S
"iPhone5,1" => "iPhone 5", //iPhone 5
"iPhone5,2" => "iPhone 5", //iPhone 5
"iPhone5,3" => "iPhone 5C", //iPhone 5C
"iPhone5,4" => "iPhone 5C", //iPhone 5C
"iPhone6,1" => "iPhone 5S", //iPhone 5S
"iPhone6,2" => "iPhone 5S", //iPhone 5S
"iPhone7,2" => "iPhone 6", //iPhone 6
"iPod1,1" => "iPod 1st Gen", //iPod Touch 1G
"iPod2,1" => "iPod 2nd Gen", //iPod Touch 2G
"iPod3,1" => "iPod 3rd Gen", //iPod Touch 3G
"iPod4,1" => "iPod 4th Gen", //iPod Touch 4G
"iPod5,1" => "iPod 5th Gen", //iPod Touch 5G
"iPad1,1" => "iPad 1", //iPad Wifi
"iPad2,1" => "iPad 2", //iPad 2 WiFi
"iPad2,2" => "iPad 2 Cellular", //iPad 2 GSM
"iPad2,3" => "iPad 2 Cellular", //iPad 2 CDMA
"iPad2,4" => "iPad 2", //iPad 2 WiFi (Rev a)
"iPad3,1" => "iPad 3", //iPad 3 WiFi
"iPad3,2" => "iPad 3 Cellular", //iPad 3 GSM+CDMA
"iPad3,3" => "iPad 3 Cellular", //iPad 3 GSM
"iPad3,4" => "iPad 4", //iPad 3 WiFi
"iPad3,5" => "iPad 4 Cellular", //iPad 3 GSM
"iPad3,6" => "iPad 4 Cellular", //iPad 3 GSM+CMMA
"iPad4,1" => "iPad Air", //iPad Air WiFi
"iPad4,2" => "iPad Air Cellular", //iPad Air Cellular
"iPad2,5" => "iPad Mini",
"iPad2,6" => "iPad Mini Cellular", // GSM
"iPad2,7" => "iPad Mini Cellular", // GSM+CDMA
"iPad4,4" => "iPad Mini Retina",
"iPad4,5" => "iPad Mini Retina Cellular",
);
if(isset($models[$model])){
return $models[$model];
} else {
return $model;
}
}
资料来源:http://theiphonewiki.com/wiki/Models
09-25 16:16