📄 uploadsave1.asp
字号:
<%
OPTION EXPLICIT
Server.ScriptTimeOut=5000
%>
<!--#include FILE="UpLoadClass.asp"-->
<!--#include file="const.asp"-->
<%
dim request2,FileName
'建立上传对象
set request2=New UpLoadClass
'上传总大小为20M
request2.TotalSize= 2971520
'单文件最大10M
request2.MaxSize = 2485760
'允许上传rar/zip格式文件
request2.FileType = "gif/jpg"
request2.SavePath = "Upfiles/"
request2.open()
%>
<html>
<head>
<title>上传</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta content="all" name="robots">
<link href="inc/style.css" rel="stylesheet" type="text/css">
</head>
<body>
<table width="760" border="0" align="center" cellpadding="5" cellspacing="0" bgcolor="#FFFFFF" style="border:1px solid #999999">
<tr>
<td><blockquote>
<%
'显示类版本
if request2.Error=4 then
response.Write("<p>总数据量超过限制,上传失败</p>")
else
response.Write("<p>总数据量没超过限制</p>")
end if
'显示源文件路径与名称
response.Write("<br>文件二:"&request2.Form("file1_Path")&request2.Form("file1_Name"))
response.Write("=>")
'显示目标文件路径与名称
response.Write(request2.SavePath&request2.Form("file1"))
FileName=request2.SavePath&request2.Form("file1")
response.write "<script>parent.document.form1.DefaultPic.value='<img src="&FileName&" border=0>'</script>"
Response.Write "<a href=admin_upload.asp><span class=14p>上传成功 返回</span></a>"
%>
<%= request2.Form("file1") %>
</blockquote></td>
</tr>
</table>
</body>
</html>
<%
'释放上传对象
set request2=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -