📄 upfile1.asp
字号:
<%
OPTION EXPLICIT
Server.ScriptTimeOut=5000
response.Buffer=true
%>
<!--#include file="chk.asp"-->
<!--#include FILE="UpLoadClass.asp"-->
<%
dim request2
dim imgpath
dim imgpath2
'建立上传对象
set request2=New UpLoadClass
'上传总大小为1000M
request2.TotalSize= 1048576000
'单文件最大500M
request2.MaxSize = 5242880
'允许上传rar/zip格式文件
request2.FileType = "rar/zip/jpg/gif"
request2.SavePath="../upfile/"
request2.open()
%>
<html>
<head>
<title>上传成功</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="style.css" rel=stylesheet type=text/css>
<script language="JavaScript">
<!-- Hide from older browsers...
//Function to add pic
function Addpic(imagePath){
window.opener.frames.message.focus();
window.opener.frames.message.document.execCommand('InsertImage', false, imagePath);
window.close();
}
// -->
</script>
</head>
<body style="margin-top:16px">
<table width="100%" 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("<br>总数据量超过限制,上传失败")
else
response.Write("<br>总数据量没超过限制")
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>文件二:"&request2.Form("strFile2_Path")&request2.Form("strFile2_Name"))
'response.Write("=>")
'显示目标文件路径与名称
'response.Write(request2.SavePath&request2.Form("strFile2"))
imgpath=request2.Form("strFile1")
imgpath2="/"&imgpath
%>
</blockquote></td>
</tr>
</table>
</body>
</html>
<%
'释放上传对象
response.write "<center><FIELDSET align=center><LEGEND align=center><font color=red>文件上传成功 </font></LEGEND><br>[ <a href=# onclick=""Addpic('"&request2.SavePath&request2.Form("strFile1")&"')"">点击这里添加到编辑器中</a> ]</fieldset>"
response.end
set request2=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -