asp图片上传程序demo

 <% @language=vbscript %>
<%

response.expires=0
%>

<html>

<head>

<title>Upload Now</title>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="css/manage.css" type="text/css">

</head>

<body bgcolor="#FFFFFF" text="#000000" topmargin="8" leftmargin="8">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="80%">
<tr>
<td>
<table width="600" border="0" cellspacing="1" cellpadding="0" align="center" bgcolor="#000000" height="180">
<tr bgcolor="#DCE8CD">
<td height="16" valign="bottom">
  <img src="img/dot2.gif" width="7" height="7"> <img src="img/dot2.gif" width="7" height="7"> <img

src="img/dot2.gif" width="7" height="7">  <b>图片上传结果 </b>
</td>
</tr>
<tr bgcolor="#FFFFFF" align="center">
<td>
<table width="88%" border="0" cellspacing="0" cellpadding="0"><tr><td>

<%

''上传图片
dim upload,file,formName,formPath
set upload=new my_upload ''建立上传对象
formPath=upload.form("filepath") ''取得上传路径
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 "<br><br>" & file.FilePath & file.FileName & " (" &

file.FileSize & ") ===> " & formPath & File.FileName & " 成功!"
end if
set file=nothing
next
set upload=nothing ''删除此对象
%>

</td></tr></table>
<br><br><br>
<a href="javascript:history.back();"><img src="img/b_ok.gif" width="45" height="17"

border="0"></a>
<br><br><br>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>

</html>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值