Uploadfile.asp
<!--#include file= ' fileconfig.asp '-->
<!doctype HTML PUBLIC "-//W3C//DTD HTML 4.0 transitional//en" >
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">
<meta name= "Keywords" content= "" >
<meta name= "Author" content= "Haiwa" >
<title>Upload</title>
<style>
<!--
* {font:12px;}
-->
</style>
<body>
<%
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 "<div style=" "COLOR:RED;FONT-SIZE:12PX;" > Error: "& Err.Number &", "& Err.Description &" <a href= "" Javascript:history.go ( -1) "" > Upload < /a></div> "
End If
If Err.Number = 8 Then
Response.Write "<div style=" "COLOR:RED;FONT-SIZE:12PX;" > You uploaded the file over the limit ("& uploadlimitsize/1024 &" M) <a href= "" Javascript:history.go ( -1) "" > Re-upload </a>< /div> "
Response.End
End If
Dim inputname
Dim size,rs_upfile
For each File in Upload.files
If not canupload (File.ext) Then
File.delete
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service