跪求高手帮忙修改一段ASP上传源代码,虽然很简单,但小弟确实玩不来

2025-01-07 19:13:06
推荐回答(2个)
回答1:

!-- #include file="Upload.asp" -->

<%
Server.ScriptTimeout = 900

formPath = "UploadFiles/"

Set upload= New DoteyUpload

Upload.SaveTo(formPath) '将文件根据其文件名统一保存在某路径下

If upload.ErrMsg = "" then
Response.Write ("列出所有form数据:
")
For each formName in upload.Form ''列出所有form数据
Response.write formName & "=" & upload.Form(formName) & "
"
next

Response.Write ("

列出所有上传了的文件:
")
For Each formName In upload.Files ''列出所有上传了的文件
Set file = upload.Files(formName) ''生成一个文件对象
response.write file.FilePath & " (" & file.FileType & "/" & file.FileSize/1024 &"K) => " & formPath & File.FileName response.write "

"
Set file=nothing
Next
Else
Response.Write("上传过程中出现错误:
" & Upload.ErrMsg)
End If

Set upload=nothing
%>

回答2:



<%
Server.ScriptTimeout = 900

formPath = "UploadFiles/"

Set upload= New DoteyUpload

Upload.SaveTo(formPath) '将文件根据其文件名统一保存在某路径下

If upload.ErrMsg = "" then
response.write "您所提交的文件已成功,我们在工作时间48小时内处理完毕,谢谢!
"
Else
Response.Write("上传过程中出现错误:
" & Upload.ErrMsg)
End If

Set upload=nothing
%>