取消ecshop程序用手机访问时自动跳到/mobile上的方法
程序员文章站
2022-06-04 19:49:37
...
打开 index.php 删除以下代码
$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;
}
}
上一篇: Openvz 架构的VPS配置ss