public function whichpad()
{
$agent = strtolower ( $_SERVER [ 'HTTP_USER_AGENT' ]);
$is_iphone = ( strpos ( $agent , 'iphone' )) ? true : false;
$is_android = ( strpos ( $agent , 'android' )) ? true : false;
if ( $is_android ==1|| $is_iphone ==1)
{
return "手机访问" ;
} else
{
return "电脑或者iPad访问" ;
}
}
|