?? upload.asp
字號:
<%OPTION EXPLICIT%>
<!--#include FILE="include.asp"-->
<!--#include FILE="upload.inc"-->
<!--#include file="session1.asp"-->
<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>
<%
dim upload,file,formName,formPath,iCount,act,iFail
set upload=new upload_5xSoft
response.write "<br><br>"&upload.Version&"<font size=2>"
if upload.form("filepath")="" then
HtmEnd "請輸入要上傳至的目錄!",1,""
set upload=nothing
response.end
else
formPath=upload.form("filepath")
''在目錄后加(/)
if right(formPath,1)<>"/" then formPath=formPath&"/"
act=procCheckDir(formpath,1)
if act<>"ok" then htmEnd "錯誤! "&act,1,""
end if
iCount=0
iFail=0
for each formName in upload.file
set file=upload.file(formName)
if file.FileSize>0 then
act=procCheckFile(file.FileName,0)
response.write "<div align=center><font size=2>"&file.FilePath&file.FileName&",大小:"&file.FileSize&" => "&formPath&File.FileName&"</font></div>"
if act="ok" then
file.SaveAs Server.mappath(formPath&file.FileName)
response.write " <div align=center><font color=#0000ff size=2>成功!</font></div>"
iCount=iCount+1
else
response.write " <div align=center><font color=#ff0000 size=2>失敗! "&act&"</font></div>"
iFail=iFail+1
end if
end if
set file=nothing
next
set upload=nothing ''刪除此對象
response.write "<br><div align=center><font size=2>"&iCount&"個文件上傳成功! "&iFail&"個文件上傳失敗</font></font></div>"
%><br>
<div align=center>
<input class="button" type=button value=關閉 onclick="window.close();">
</div>
<script language=javascript>
if(window.opener&&window.opener.refreshit)
window.opener.refreshit();
</script>
<%htmEnd "",0,""%>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -