最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
ASPUpload上传的实现代码(测试通过)4
时间:2022-06-30 11:15:52 编辑:袖梨 来源:一聚教程网
uploadfile.asp
Upload
<%
On Error Resume Next
Server.ScriptTimeOut=999999
if request("act")="upload" then
dim folder,savepath
savepath=Server.MapPath(UploadFilePath)
CreateFolder(savepath)
Set Upload=Server.CreateObject("Persits.Upload")
Upload.SetMaxSize UploadLimitSize*1024, True
Upload.OverwriteFiles = false
if Request.QueryString("PID") = "" then
Upload.ProgressID="010D60EB00C5AA4B"
else
Upload.ProgressID=Request.QueryString("PID")
end if
Count=Upload.Save(savepath)
If Err.Number <> 0 Then
Response.Write "
End If
If Err.Number = 8 Then
Response.Write "
response.end
end if
dim inputname
dim size,rs_upfile
For Each File in Upload.Files
if not CanUpload(File.ext) then
File.Delete
<%
On Error Resume Next
Server.ScriptTimeOut=999999
if request("act")="upload" then
dim folder,savepath
savepath=Server.MapPath(UploadFilePath)
CreateFolder(savepath)
Set Upload=Server.CreateObject("Persits.Upload")
Upload.SetMaxSize UploadLimitSize*1024, True
Upload.OverwriteFiles = false
if Request.QueryString("PID") = "" then
Upload.ProgressID="010D60EB00C5AA4B"
else
Upload.ProgressID=Request.QueryString("PID")
end if
Count=Upload.Save(savepath)
If Err.Number <> 0 Then
Response.Write "
出现错误: " & Err.Number & "、" & Err.Description &"重新上传
"End If
If Err.Number = 8 Then
Response.Write "
你上传的文件超过限制("& UploadLimitSize/1024 &"M)重新上传
" response.end
end if
dim inputname
dim size,rs_upfile
For Each File in Upload.Files
if not CanUpload(File.ext) then
File.Delete