ASP上傳功能的實例分析
作者: 來源: 發(fā)布時間:2011-6-7 15:32:13 點擊:
'如果數(shù)據(jù)以文件形式保存到磁盤上,用下面這句
'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上傳功能的實例分析[收藏此文章]