📄 upload.asp
字号:
<%
'----------------------------------------------------------
'***************** 风声无组件上传类 2.0 *****************
'风声无组件上传类2.0B(Rumor UpLoadClass Version 2.0B)
'增加了一个属性TotalSize,控制总数据量大小
'及早结束超过大小的上传,缓解服务器压力
'下面是上传程序(upload.asp)的代码和注释
'**********************************************************
'----------------------------------------------------------
OPTION EXPLICIT
Server.ScriptTimeOut=5000
%>
<!--#include FILE="UpLoadClass.asp"-->
<%
dim request2
'建立上传对象
set request2=New UpLoadClass
'上传总大小为20M
request2.TotalSize= 20971520
'单文件最大10M
request2.MaxSize = 10485760
'允许上传rar/zip格式文件
request2.FileType = "jpg/gif"
request2.open()
%>
<html>
<head>
<title>上传进度条——风声无组件上传类</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta content="all" name="robots">
<meta name="author" content="rumor@17560.net,风声">
<meta name="Copyright" content="www.17560.net">
<meta name="description" content="风声无组件上传类">
<meta content="风声,ASP,无组件,上传类,NB,NetBuilder,网标,坐标,更快,更方便,更安全," name="keywords">
</head>
<body>
<table width="760" border="0" align="center" cellpadding="5" cellspacing="0" bgcolor="#FFFFFF" style="border:1px solid #999999">
<tr>
<td><blockquote>
<%
'显示类版本
response.Write("<br>"&request2.version&"<br>")
if request2.Error=4 then
response.Write("<p>总数据量超过限制,上传失败</p>")
else
response.Write("<p>总数据量没超过限制</p>")
end if
'显示源文件路径与名称
response.Write("<br>文件一:"&request2.Form("strFile1_Path")&request2.Form("strFile1_Name"))
response.Write("=>")
'显示目标文件路径与名称
response.Write(request2.SavePath&request2.Form("strFile1"))
response.write "<br>[<a href=""javascript:history.back();"">返回</a>]"
response.write "<br>请把上传成功后的文件名"
response.Write(request2.SavePath&request2.Form("strFile1"))
response.write "复制到前面的图片地址填写框中"
%>
</blockquote></td>
</tr>
</table>
</body>
</html>
<%
'释放上传对象
set request2=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -