||
$ua = strtolower($_SERVER['HTTP_USER_AGENT']);
$uachar = "/(nokia|sony|ericsson|mot|samsung|sgh|lg|philips|panasonic|alcatel|lenovo|cldc|midp|mobile)/i";
if(($ua == '' || preg_match($uachar, $ua))&& !strpos(strtolower($_SERVER['REQUEST_URI']),'wap'))
{
$Loaction = 'mobile/';
if (!empty($Loaction))
{
ecs_header("Location: $Loaction\n");
exit;
}
}
来源: 腾讯:http;//www.qq.com和http://blog.sina.com.cn/s/blog_54318f230100u30w.html
联系我们|Archiver|小黑屋|手机版|滚动|柠檬大学 ( 京ICP备13050917号-2 )
GMT+8, 2024-5-4 04:28 , Processed in 0.025609 second(s), 19 queries .
Powered by Discuz! X3.5 Licensed
© 2001-2023 Discuz! Team.