首页 » 网站模板 » 手机版模板,手机访问时显示主页不变,slm主题

手机版模板,手机访问时显示主页不变,slm主题

一个简单的手机模板,当手机访问时才会触发。请上传时候一定要备份,因未备份导致的一切问题,自行解决。

使用方法:
1、在原模板的module.php文件中加入下面代码,不要问我放那个位置,你想放哪里位置都可以
<?php 
function sywap(){ 
$user_agent = $_SERVER['HTTP_USER_AGENT']; 
$mobile_agents = array("240x320","acer","acoon","acs-","abacho","ahong","airness","alcatel","amoi","android","anywhereyougo.com","applewebkit/525","applewebkit/532","asus","audio", "au-mic","avantogo","becker","benq","bilbo","bird","blackberry","blazer","bleu","cdm-","compal","coolpad","danger","dbtel","dopod","elaine","eric","etouch","fly ","fly_","fly-","go.web","goodaccess","gradiente","grundig","haier","hedy","hitachi","htc","huawei","hutchison","inno","ipad","ipaq","iphone","ipod","jbrowser","kddi","kgt","kwc","lenovo","lg ","lg2","lg3","lg4","lg5","lg7","lg8","lg9","lg-","lge-","lge9","longcos","maemo","mercator","meridian","micromax","midp","mini","mitsu","mmm","mmp","mobi","mot-","moto","nec-","netfront","newgen","nexian","nf-browser","nintendo","nitro","nokia","nook","novarra","obigo","palm","panasonic","pantech","philips","phone","pg-","playstation","pocket","pt-","qc-","qtek","rover","sagem","sama","samu","sanyo","samsung","sch-","scooter","sec-","sendo","sgh-","sharp","siemens","sie-","softbank","sony","spice","sprint","spv","symbian","tablet","talkabout","tcl-","teleca","telit","tianyu","tim-","toshiba","tsm","up.browser","utec","utstar","verykool","virgin","vk-","voda","voxtel","vx","wap","wellco","wig browser","wii","windows ce","wireless","xda","xde","zte"); 
$sywap = false;foreach($mobile_agents as $device){if(stristr($user_agent, $device)) {$sywap = true;break;}}return $sywap;}?>
2、在原模板header.php找到require_once View::getView('module');后面加入代码
<?php if(sywap()){include View::getView('slm/head');exit;}?>
3、下载本模板文件,然后直接上传到下载使用的模板目录中,例如:现在使用的是默认模板,则上传到default文件中

以上3步就完成了,请在未修改的情况下测试,上传后请使用手机访问查看,电脑是不会显示的。
slm.jpg

文件请在QQ群文件中下载,如有疑问可在本页留言或者QQ群中咨询。
End
太阳城申博打赏
X
打赏方式:
  • 支付宝
  • 微信
  • QQ红包

打开支付宝扫一扫
温馨提示:如果您对本文有疑问,请在本页留言即可,其他途径暂不回复!!!
blogger
    本页正文内容约1826个文字
    本文地址:http://tycsb.nba71.net/template/957.html [ 百度已收录 ]
    短网址: [复制短网址]
    声明:本页信息由网友自行发布或来源于网络,真实性、合法性由发布人负责,请仔细甄别!本站只为传递信息,我们不做任何双方证明,也不承担任何法律责任。文章内容若侵犯你的权益,请联系本站删除!

留言/评论:◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

填写好QQ号码,任点空白处自动获取

昵称

邮箱

网址

3楼、始于心动 [回复该留言]
2019-04-09 23:16
波波影视准备用这个模板【网址屏蔽】
2楼、Power [回复该留言]
2018-02-26 13:53
不错不错
1楼、Chelders [回复该留言]
2017-06-25 02:19
时间那么贵,留给相处不累的人!

个人资料

舍力

博主:舍力

Emlog交流群

    网站制作
    1、博客网站以Emlog为程序;
    2、企业网站建议以米拓MetInfo为程序,当然也可以用Emlog来做。

博客统计

  • 文章数量:1076篇
  • 文章评论:3246条
  • 总访问量:4159058次
  • 微语数量:50条
  • 在线人数:1人
  • 本站运行:5年8月5天
  • 博主连续3天都没有更新文章了!
Q2 虚位以待
Copyright ? 2019 舍力博客 版权所有   粤ICP备11021420号
基于太阳城申博,数据存储于阿里云ECS
Powered by emlog / &Author 申博在线游戏网址登入.
网站地图 申博电子游戏 申博app下载 申博官网登录 申博手机下载版
申博360官网登入 菲律宾太阳城娱乐官网 申博在线代理 www.98msc.com
777老虎机游戏登入 申博太阳城登入 申博娱乐网 申博138
申博百家乐 真钱百家乐 网上百家乐 申博游戏登入
申博 太阳城网址 申博游戏 申博现金网址