完整的代码,有部分注释,应该看的明白...需要你手动设置一下,如 :数据库路径,上传路径等等代码如下:<%
if lcase(request("upload"))="true" then
dim upload,file,formName,formPath,iCount
dim upmsg
set upload=new upload_5xSoft
SET conn =SERVER.CREATEOBJECT("ADODB.CONNECTION")
SET rs =SERVER.CREATEOBJECT("ADODB.RECORDSET")
conn.open "driver={Microsoft Access Driver (*.mdb)};dbq=" & server.mappath("ss.mdb") '要写入数据库路径
formpath=server.mappath(".") & "\" '上传文件路径
iCount=0
for each formName in upload.file
set file=upload.file(formName)
if file.FileSize>0 then
file.SaveAs formPath & replace(file.FileName," ","")
upmsg=upmsg & vbcrlf & replace(file.FileName," ","") & " 上传成功!" '开始把上传文件名称写入数据库
rs.open "select * from upload",conn,1,3
rs.addnew
rs("文件名")=formPath & replace(file.FileName," ","")
rs.update
rs.close
'写入数据库结束 iCount=iCount+1
end if
set file=nothing
next
set upload=nothing ''删除此对象
upmsg=upmsg & vbcrlf & iCount&" 个文件上传结束!"
response.write "" & vbcrlf
response.end
end if
%>
用for循环读取出每个图片的路径就可以了