ASP上传功能的实例分析
作者: 来源: 发布时间:2011-6-7 15:32:13 点击:
'如果数据以文件形式保存到磁盘上,用下面这句
'saveBin2File sCome,posFileBegin,posFileLen,server.MapPath("./") & strFileName
'saveBin2File sCome,posFileBegin,posFileLen,server.MapPath("./") & strFileName
rs.Update
rs.Close
set rs = nothing
cn.Close
set cn = nothing
Response.Write "<p>文件保存成功!</p>"
else
Response.Write "<p>没有上传文件!</p>"
end if
sCome.Close
set sCome = nothing
else
%>
<form id="frmUpload" name="frmUpload" action="<%=Request.ServerVariables("script_name")%>" method="post" target="_self" enctype="multipart/form-data">
<p>标题:<input id="txtTitle" type="text" name="txtTitle" size="40"></p>
<p>图片:<INPUT id="filImage" type="file" name="filImage" size="40"></p>
<INPUT id="btnUpload" type="submit" value="Upload" name="btnUpload">
</form>
<%
end if
%>
</body>
</HTML>
Tags:
ASP上传功能的实例分析[收藏此文章]