📄 upfile.asp
字号:
<%OPTION EXPLICIT%>
<%
if session("admin")="" then
response.redirect "login.asp"
end if
%>
<!--#include FILE="upload_5xsoft.inc"-->
<html>
<head>
<title>东方订房网——本地化、专业便捷快速优惠预订上海酒店,上海宾馆,上海酒店公寓,上海饭店,上海住宿,上海会议,浦东酒店,浦东会议,上海展会,上海培训</title>
<link href="../admin.css" rel="stylesheet" type="text/css">
</head>
<body>
<table width="400" height="100" border="0" align="center" cellpadding="10" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td align="center"><%
dim upload,file,formName,formPath,iCount
set upload=new upload_5xSoft ''建立上传对象
response.write "文件上传成功!<br>" ''显示上传类的版本
if upload.form("filepath")="" then ''得到上传目录
HtmEnd "请输入要上传至的目录!"
set upload=nothing
response.end
else
formPath=upload.form("filepath")
''在目录后加(/)
if right(formPath,1)<>"/" then formPath=formPath&"/"
end if
iCount=0
for each formName in upload.file ''列出所有上传了的文件
set file=upload.file(formName) ''生成一个文件对象
if file.FileSize>0 then ''如果 FileSize > 0 说明有文件数据
file.SaveAs Server.mappath(formPath&file.FileName) ''保存文件
response.write "请复制此文件名到地理位置文本框:<font color=red><b>"&File.FileName&"</b></font><br>"
iCount=iCount+1
end if
set file=nothing
next
set upload=nothing ''删除此对象
Htmend iCount&" 个文件上传结束!"
sub HtmEnd(Msg)
set upload=nothing
response.write "[<a href=""javascript:window.close();"">关闭</a>]"
response.end
end sub
%></td>
</tr>
</table>
</body>
</html>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -