$ua = strtolower($_SERVER['HTTP_USER_AGENT']);
$uachar = "/(nokia|sony|ericsson|mot|samsung|sgh|lg|philips|panasonic|alcatel|lenovo|cldc|midp|mobile|wap)/i";
if(($ua == '' || preg_match($uachar, $ua))&& !strpos(strtolower($_SERVER['REQUEST_URI']),'wap'))
{
$Loaction = 'wap/';
if (!empty($Loaction))
{
ecs_header("Location: $Loaction\n");
exit;
}
}
来自ecshop的代码.
196

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



