uploads.asp
来自「很好的企业网站管理系统!可以适应各种不同的小型企业!」· ASP 代码 · 共 57 行
ASP
57 行
<%OPTION EXPLICIT%>
<!--#include FILE="include.asp"-->
<!--#include FILE="upload.inc"-->
<html>
<head>
<title>文件上传</title>
<link rel="stylesheet" href="admin.css" type="text/css">
</head>
<body>
<%
dim upload,file,formName,formPath,iCount,act,iFail
set upload=new upload_5xSoft
response.write "<br><br>"&upload.Version&""
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 "<br>"&file.FilePath&file.FileName&",大小:"&file.FileSize&" => "&formPath&File.FileName&"<br>"
if act="ok" then
file.SaveAs Server.mappath(formPath&file.FileName)
response.write " <font color=#0000ff size=2>成功!</font>"
iCount=iCount+1
else
response.write " <font color=#ff0000 size=2>失败! "&act&"</font>"
iFail=iFail+1
end if
end if
set file=nothing
next
set upload=nothing ''删除此对象
response.write "<br>"&iCount&" 个文件上传成功! "&iFail&"个文件上传失败</font></font>"
%><br>
<input type=button value=返回 onclick="location.href='upfiles.asp';">
<input type=button value=关闭 onclick="window.close();">
<script language=javascript>
if(window.opener&&window.opener.refreshit)
window.opener.refreshit();
</script>
<%htmEnd "",0,""%>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?