?? upfile.asp
字號:
<%
OPTION EXPLICIT
Server.ScriptTimeOut=5000
response.Buffer=true
%>
<!--#include file="chk.asp"-->
<!--#include FILE="UpLoadClass.asp"-->
<%
dim request2
dim imgpath
dim imgpath2
dim yqjflag
'建立上傳對象
set request2=New UpLoadClass
'上傳總大小為1000M
request2.TotalSize= 1048576000
'單文件最大500M
request2.MaxSize = 5242880
'允許上傳rar/zip格式文件
request2.FileType = "jpge/bmp/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>
</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>總數(shù)據(jù)量超過限制,上傳失敗")
else
response.Write("<br>總數(shù)據(jù)量沒超過限制")
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")
%>
</blockquote></td>
</tr>
</table>
</body>
</html>
<%
'釋放上傳對象
response.write "<script>opener.document.forms[0].ssort_pic.value='"&imgpath&"'</script>"
response.write "<center><FIELDSET align=center><LEGEND align=center><font color=red>文件上傳成功 </font></LEGEND><br>[ <a href=# onclick=""javascript:window.close()"">點擊這里關(guān)閉窗口</a> ]</fieldset>"
response.end
set request2=nothing
%>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -