仓酷云

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 611|回复: 9
打印 上一主题 下一主题

[学习教程] ASP网站制作之asp上传下载

[复制链接]
小魔女 该用户已被删除
跳转到指定楼层
楼主
发表于 2015-1-16 22:16:43 | 显示全部楼层 回帖奖励 |倒序浏览 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
减少客户内IT专业人才缺乏带来的影响。ASP的客户员工利用浏览器进入相关的应用软件,简单易用,无需专业技术支持。上传|下载一共3个文件
<--upfile.asp-->http://ktgirl001.0033.cn
<%OPTIONEXPLICIT%>
<%Server.ScriptTimeOut=5000%>
<!--#includeFILE="upload_5xsoft.inc"-->
<html>
<head>
<title>文件上传</title>
</head>
<body>
<br>化境文件上传!<hrsize=1noshadowwidth=300align=left><br><br>
<%
dimupload,file,formName,formPath,iCount
setupload=newupload_5xsoft创建上传工具
response.writeupload.Version&"<br><br>"显现上传类的版本
ifupload.form("filepath")=""then失掉上传目次
HtmEnd"请输出要上传至的目次!"
setupload=nothing
response.end
else
formPath=upload.form("filepath")
在目次后加(/)
ifright(formPath,1)"/"thenformPath=formPath&"/"
endif
iCount=0
foreachformNameinupload.objForm列出一切form数据
response.writeformName&"="&upload.form(formName)&"<br>"
next
response.write"<br>"
foreachformNameinupload.objFile列出一切上传了的文件
setfile=upload.file(formName)天生一个文件工具
iffile.FileSize>0then假如FileSize>0申明有文件数据
file.SaveAsServer.mappath(formPath&file.FileName)保留文件
response.writefile.FilePath&file.FileName&"("&file.FileSize&")=>"&formPath&File.FileName&"乐成!<br>"
iCount=iCount+1
endif
setfile=nothing
next
setupload=nothing删除此工具
HtmendiCount&"个文件上传停止!"
subHtmEnd(Msg)
setupload=nothing
response.write"<br>"&Msg&"[<ahref=""javascript:history.back();"">前往</a>]</body></html>"
response.end
endsub
%>
</body>
</html>
ASP脚本是采用明文(plaintext)方式来编写的。
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|仓酷云 鄂ICP备14007578号-2

GMT+8, 2024-5-22 18:22

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表