无组件上传得保存路径在哪里修改!
zxlh 2003-10-05 05:54:29 <%
dim sname
dim squest
dim sfiles
dim upload,file,formName,formPath,iCount,url
set upload=new upload_5xSoft ''建立上传对象
response.write upload.Version&"<br><br>" ''显示上传类的版本
if upload.form("filepath")="" then ''得到上传目录
HtmEnd "请输入要上传至的目录!"
set upload=nothing
response.end
else
sName=upload.form("txtcomp")
squest=upload.form("txtcon")
formPath=upload.form("filepath")
''在目录后加(/)
if right(formPath,1)<>"/" then formPath=formPath&"jtl/"
end if
iCount=0
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 file.FilePath&file.FileName&" ("&file.FileSize&") => "&formPath&File.FileName&" <br>"
sfiles=File.FileName
dim conn
dim connstr
on error resume next
connstr="DBQ="+server.mappath("haixv.mdb")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
set conn=server.createobject("ADODB.CONNECTION")
conn.open connstr
dim cmdTemp
dim InsertCursor
Set cmdTemp = Server.CreateObject("ADODB.Command")
Set InsertCursor = Server.CreateObject("ADODB.Recordset")
cmdTemp.CommandText = "SELECT * FROM loadfiles"
cmdTemp.CommandType = 1
Set cmdTemp.Activeconnection = conn
InsertCursor.Open cmdTemp, , 1, 3
InsertCursor.addnew
InsertCursor("username") =sName
InsertCursor("userfiles") =sfiles
InsertCursor("quest") =squest
InsertCursor("time") =cstr(now())
InsertCursor.Update
InsertCursor.close
conn.close
set InsertCursor=nothing
set conn=nothing
'' url="http://www.artnetcn.com/" ''设定url路径
'' response.write ("Your File Patch : "&url)
iCount=iCount+1
end if
set file=nothing
next
set upload=nothing ''删除此对象
Htmend iCount&" 个文件被上传!你上传的文件名为:"& sfiles
response.write "<br><br><br>"
sub HtmEnd(Msg)
set upload=nothing
我想修改上传文件的保存路径在哪里修改,谢谢!