Ecshop屏幕wap
突然发现用android智能手机打开Ecshop网站的时候,网站似乎没有样式,但是在后台设置wap,关闭后用手机访问网站提示:网站关闭wap访问。
只好找到Ecshop的根目录下的index.php文件,注释或者删除以下判断上网环境的代码即可:
1 $ua = strtolower($_SERVER['HTTP_USER_AGENT']); 2 3 $uachar = "/(nokia|sony|ericsson|mot|samsung|sgh|lg|philips|panasonic|alcatel|lenovo|cldc|midp|mobile)/i"; 4 5 if(($ua == '' || preg_match($uachar, $ua))&& !strpos(strtolower($_SERVER['REQUEST_URI']),'wap')) 6 { 7 $Loaction = 'mobile/'; 8 9 if (!empty($Loaction)) 10 { 11 ecs_header("Location: $Loaction\n"); 12 13 exit; 14 } 15 16 }