zblog手机访问(zblog app)
- ZBLOG
- 2022-12-19 05:39:33
- 35
本篇文章给大家谈谈zblog手机访问,以及zblog app对应的知识点,希望对各位有所帮助,不要忘了收藏本站喔。
本文目录一览:
请教ASP检测手机客户端并跳转到相应页面,下面这段代码是找的,但是复制到页面里不好用,ASP我不是很懂。
假如你的网址是:
那你的Index.asp是
那你的wap.asp是
那你的代码如下:
%
Function CheckMobile()
'是否由wap转入电脑版
If Not IsEmpty(Request.ServerVariables("HTTP_REFERER")) And InStr(LCase(Request.ServerVariables("HTTP_REFERER")),"wap.asp")=0 Then
CheckMobile=False:Exit Function
End If
'是否专用wap浏览器
If InStr(LCase(Request.ServerVariables("HTTP_ACCEPT")), "application/vnd.wap.xhtml+xml") Or Not IsEmpty(Request.ServerVariables("HTTP_X_PROFILE")) Or Not IsEmpty(Request.ServerVariables("HTTP_PROFILE")) Then
CheckMobile=True:Exit Function
End If
'是否(智能)手机浏览器
Dim MobileBrowser_List,PCBrowser_List,UserAgent
MobileBrowser_List ="up.browser|up.link|mmp|iphone|android|wap|netfront|java|opera\smini|ucweb|windows\sce|symbian|series|webos|sonyericsson|sony|blackberry|cellphone|dopod|nokia|samsung|palmsource|palmos|pda|xphone|xda|smartphone|pieplus|meizu|midp|cldc|brew|tear"
PCBrowser_List="mozilla|chrome|safari|opera|m3gate|winwap|openwave"
UserAgent = LCase(Request.ServerVariables("HTTP_USER_AGENT"))
If CheckRegExp(UserAgent,MobileBrowser_List) Then
CheckMobile=True:Exit Function
ElseIf CheckRegExp(UserAgent,PCBrowser_List) Then '未知手机浏览器,其UA标识为常见浏览器,不跳转
CheckMobile=False:Exit Function
Else
CheckMobile=False
End If
End Function
If CheckMobile() Then Response.Redirect (“")
%
要想代码能用,你还需要CheckRegExp(UserAgent,MobileBrowser_List)这个函数的定义,就像上面的Function CheckMobile()一样。
zblog如何不让手机端显示网站关键词
那就需要用到判断手机端的php代码了,你可以百度搜索下php判断手机端代码,把代码修改下放到模版header.php里,做下判断手机不显示关键词。
zblog 手机页添加统计代码
这是zblog的bug,如果是加入javascript的统计代码,web浏览是正常的。楼下说的方式即可。
但手机无法浏览内容页,因为手机访问静态页会报javascript错误,因为有嵌套,除非你手动修改。如你看到只有一个统计代码的图标。至少我调试了半天是这样的,希望对你有帮助。
关于zblog手机访问和zblog app的介绍到此就结束了,不知道你从中找到你需要的信息了吗 ?如果你还想了解更多这方面的信息,记得收藏关注本站。
本文由admin于2022-12-19发表在靑年PHP官网,如有疑问,请联系我们。
本文链接:https://qnphp.com/post/41158.html