upload.asp

来自「结合了某度和AH的个人主页 功能比较完整」· ASP 代码 · 共 62 行

ASP
62
字号
<%
OPTION EXPLICIT
Server.ScriptTimeOut=5000
%>
<!--#include FILE="UpLoadClass.asp"-->
<%
dim request2

'建立上传对象
set request2=New UpLoadClass
	'上传总大小为20M
	request2.TotalSize= 60971520
	'单文件最大10M
	request2.MaxSize  = 20485760
	'允许上传rar/zip格式文件
	request2.FileType = "rar/zip"
	request2.open()
%>
<html>
<head>
<title>上传</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>

<body background="../../img/dnacebg2.jpg">
<table width="760" border="0" align="center" cellpadding="5" cellspacing="0" bgcolor="#EDCEA2" 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 "<font size=2><br>[<a href=""javascript:history.back();"">返回</a>]"
        response.write "<br>文件已成功上传文件名为"
        response.Write(request2.SavePath&request2.Form("strFile1"))
        response.write "<br>该文件的http访问地址为下载系统的upload文件夹加文件名.如:"
        response.write "<br>该下载系统在www.miner.cn的down目录下.则下载文件的地址为http://www.miner.cn/down/upload/"
        response.Write(request2.SavePath&request2.Form("strFile1"))   
	response.write "</font>"%>
    </blockquote></td>
  </tr>
</table>
</body>
</html>
<%
'释放上传对象
set request2=nothing
%>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?