?? 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 + -