以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 怎样设置阿里云服务器只允许微信访问,其他拒绝访问? (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=137914) |
-- 作者:ifozhang -- 发布时间:2019/7/18 11:08:00 -- 怎样设置阿里云服务器只允许微信访问,其他拒绝访问? 出于安全考虑,非微信拒绝访问。如何设置? |
-- 作者:有点蓝 -- 发布时间:2019/7/18 11:54:00 -- js文件:cm.js function checkagent() { var ua = navigator.userAgent; var idx = ua.indexOf("MicroMessenger"); if (idx == -1) { location="error.htm"; } } httprequest Select Case e.Path Case "test.htm" Dim wb As New weui wb.AddForm("","form1","test.htm") With wb.AddButtonGroup("form1","btg1",True) \'垂直排列 .Add("btn1", "按钮") .Add("btn4", "按钮", "reset") .Add("btn5", "按钮", "", "http://www.foxtable.com") \'单击这个按钮可以打开foxtable主页 End With With wb.AddButtonGroup("form1","btg2", False) \'水平排列 .Add("btn6", "按钮") .Add("btn7", "按钮").Kind = 2 End With With wb.AddButtonGroup("form1","btg3", False) .Add("btn8", "按钮").Kind = 0 .Add("btn9", "按钮").Kind = 1 End With wb.AppendHTML("<script src=\'./lib/cm.js\'></script>",True) wb.AppendHTML("<script>checkagent()</script>",True) e.WriteString(wb.Build) \'生成网页 Case "error.htm" Dim wb As new WeUI With wb.AddMsgPage("","msgpage","警告","本网站只能在微信中打开") End With e.WriteString(wb.Build) \'生成网页 End Select |
-- 作者:ifozhang -- 发布时间:2019/7/18 15:02:00 -- 感谢蓝老师! |