• 欢迎访问搞代码网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站!
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏搞代码吧

web文件管理器的后续开发

asp 搞代码 4年前 (2022-01-03) 30次浏览 已收录 0个评论
web文件管理器的后续开发。。。     选择自 iuhxq 的 Blog  
关键字   web文件管理器的后续开发。。。 
出处    

 今天看了一下ccopus的DM45,做的很不错,在这之前我也想做一个了,做一个跟windows资源管理器非常类似的程序。看到dm45以后觉得自己还是放弃吧,WEB方式的文件管理无论如何都是在权限允许内操作,而且大家实现的也都差不多,无非是在外观上,易操作上做文章,文件管理本来作用也不是很大,如果是多用户的权限比较难控制,既然别人做了,我想还是不要重复劳动的好,况且也不见得能做的好。下面的代码贴出来留个纪念,实现了文件的本地排序。但目录之间的层次还没有搞好。有兴趣的可以拿去参考,理论上应该可以实现跟windows资源管理器极类似的界面和操作方式。整个界面都采取无刷新方式。用XMLHTTP来执行后台代码,用JS来修改前台显示。这里体现了一种思想,希望对初学者能有个帮助。
代码如下:
WEB文件管理器2.0版 http://asp2004.net

<!–
a {
 font-size: 9pt;
 color: #3300CC;
 text-decoration: none;
}
body {
 f

来源gaodai.ma#com搞#代!码网

ont-size: 9pt;
 margin-left: 0px;
 margin-top: 0px;
 margin-right: 0px;
 margin-bottom: 0px;
 line-height: 20px;
 background-color: #EEEEEE;
}
td {
 font-size: 9pt;
 line-height: 20px;
}
.tx {
 border-color:#000000;
 border-left-width: 0px;
 border-top-width: 0px;
 border-right-width: 0px;
 border-bottom-width: 1px;
 font-size: 9pt;
 background-color: #EEEEEE;
}
.tx1 {
 font-size: 9pt;
 border: 1px solid;
 border-color:#000000;
 color: #000000;
}
–>

<%

‘版权声明:本代码仅供学习研究之用,本人不对因使用本程序而造成的任何后果负责。未经作者书面许可不得用于商业用途。
‘QQ:103895
’email:[email protected]
http://asp2004.net

Server.ScriptTimeout = 999
action = Request(“action”)
temp = Split(Request.ServerVariables(“URL”), “/”)
url = temp(UBound(temp))

Const pass = “”‘登陆密码

‘登陆验证

Set fso = CreateObject(“Scripting.FileSystemObject”)
        Path = Request(“foldername”)
        If Path = “” Then Path = server.MapPath(“./”)
        ShowFolderList(Path)
Set fso = Nothing

‘列出文件和文件夹

Function ShowFolderList(folderspec)
    temp = Request.ServerVariables(“HTTP_REFERER”)
    temp = Left(temp, Instrrev(temp, “/”))
    temp1 = Len(folderspec) – Len(server.MapPath(“./”)) -1
    If temp1>0 Then
        temp1 = Right(folderspec, CInt(temp1)) + “\”
    ElseIf temp1 = -1 Then
        temp1 = “”
    End If
    tempurl = temp + Replace(temp1, “\”, “/”)
    uppath = “./” + Replace(temp1, “\”, “/”)
    upfolderspec = fso.GetParentFolderName(folderspec&”\”)
    Set f = fso.GetFolder(folderspec)
%>

<%

Response.Write(“”)
End Function

function jscode(s)
 jscode = replace(s,”\”,”\\\\”)
end function

%> 

  

 

以上就是web文件管理器的后续开发的详细内容,更多请关注gaodaima搞代码网其它相关文章!


搞代码网(gaodaima.com)提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发送到邮箱[email protected],我们会在看到邮件的第一时间内为您处理,或直接联系QQ:872152909。本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:web文件管理器的后续开发

喜欢 (0)
[搞代码]
分享 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址