以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  设置默认网页问题  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=102135)

--  作者:zhangjian222200
--  发布时间:2017/6/13 20:48:00
--  设置默认网页问题
httprequest代码如下:
Dim fl As String = "e:\\web\\" & e.path
If filesys.FileExists(fl)
    Dim idx As Integer = fl.LastIndexOf(".")
    Dim ext As String  = fl.SubString(idx)
    Select Case ext
        Case ".jpg",".gif",".png",".bmp",".wmf",".js",".css" ,".html",".htm",".zip",".rar"
            e.WriteFile(fl)
            Return \'这里必须返回
    End Select
End If
\'msgbox("0===" & e.Path & ",fl=" & fl)
Dim wb As New weui
If e.Path = "login.htm" Then \'以下网页是:需要验证登录的代码
    ****** \'登录验证代码
    Select Case e.Path
        Case "login.htm"
            Functions.Execute("login",e)
    End Select
Else \'以下网页是:不需要验证登录的代码
    Select Case e.Path
        Case "index.htm","" \'在电脑上测试,浏览器输入127.0.0.1时,不进入index.htm页面,其他页面进入正常
            Functions.Execute("index",e)
    End Select
End If
[此贴子已经被作者于2017/6/13 21:11:03编辑过]

--  作者:有点蓝
--  发布时间:2017/6/13 21:16:00
--  
测试没有问题。
--  作者:zhangjian222200
--  发布时间:2017/6/13 22:15:00
--  
我把项目上传到服务器了,浏览器输入:
http://www.langwowang.com/index.htm  可以访问
http://www.langwowang.com 页面空白,无法访问(你可以测试下)

下面是httprequest全部代码:


[此贴子已经被作者于2017/6/14 9:48:18编辑过]

--  作者:有点蓝
--  发布时间:2017/6/13 22:37:00
--  
Functions.Execute("index",e),函数代码看看
--  作者:zhangjian222200
--  发布时间:2017/6/13 22:44:00
--  
回楼上
index.htm全部代码:


[此贴子已经被作者于2017/6/14 9:48:02编辑过]

--  作者:有点蓝
--  发布时间:2017/6/13 23:46:00
--  
函数里的这些代码都可以去掉,没有意义的,减低效率而已

Select Case e.path
    Case "index.htm"