手机和平板电脑等移动终端访问ECSHOP提示没有开启手机购物功能,会强制跳转到域名/mobile目录,如果不打算启用手机版商城可以通过修改index.php实现手机、平板访问PC版页面。

ECSHP根目录下找到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;
}
}

再用手机测试,搞定!

 

» ECshop手机访问出现:对不起,XX暂时没有开启手机购物功能,强制访问PC版页面方法

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。