时间:2021-07-01 10:21:17 帮助过:57人阅读
可通?HTTP_USER_AGENT?判?。
function getUserAgent(){ $agent = $_SERVER['HTTP_USER_AGENT']; if(stripos($agent,'iPod')!==false||stripos($agent,'iPhone')!==false||stripos($agent,'iPad')!==false){ return 'iOS'; }elseif(stripos($agent,'Android')!==false){} return 'Android'; }else{ return 'other'; }}