自动识别电脑与手机并进入相应页面
把以下代码保存为一个asp文件,如默认首页文件index.asp,
<%
Response.Buffer = TRUE
httpAccept = LCase(Request.ServerVariables("HTTP_ACCEPT"))
if Instr(httpAccept,"wap") then
Response.Redirect "/wap/index.asp" ‘WAP页面路径
else Response.Redirect "default.asp" ‘WEB页面
End if %>
自动识别电脑与手机并进入相应页面:等您坐沙发呢!
发表评论
![](http://2.gravatar.com/avatar/?s=40&d=http%3A%2F%2Flinlik.com%2Fwp-content%2Fthemes%2Fhicms%2Fimages%2Fgravatar.png&r=g)