深圳 语音感应音箱:多文件上传问题。。。帮帮忙了。。。在线等

来源:百度文库 编辑:高考问答 时间:2024/04/28 00:15:29
为什么我上传一个文件时能传到指定目录,可是多了就只能传到根目录上了。
我的代码如下:
upload.asp
...
<form name="form" method="post" action="upfile.asp" enctype="multipart/form-data" >
.......
<input type="hidden" name="act" value="upload">
<input type="hidden" name="filepath" value="../uploading/">

upfile.asp
<!--#include FILE="upload.inc"-->
<!--#include file="../fn/conn.asp"-->
<....<%
dim upload,file,formName,formPath,iCount,filename,fileExt
set upload=new upload_jy ''建立上传对象

formPath=upload.form("filepath")
''在目录后加(/)
if right(formPath,1)<>"/" then formPath=formPath&"/"
.....
iCount=0
for each formName in upload.file ''列出所有上传的文件
set file=upload.file(formName) ''生成一个文件对象
if file.filesize<100 then
response.write "<font class='logo'>文件上传发生错误,请先选择你要上传的文件 [ <a href=# onclick=history.go(-1)>重新上传</a> ]</font>"
response.end
end if

fileExt=lcase(right(file.filename,4))

if fileEXT<>".doc" and fileEXT<>".rar" and fileEXT<>".xls" and fileEXT<>".ppt" and fileEXT<>".dbf" then
response.write "<font class='logo'>文件上传发生错误,文件格式不正确 [ <a href=# onclick=history.go(-1)>重新上传</a> ]</font>"
response.end
end if

filename=file.filename
if file.FileSize>0 then ''如果 FileSize > 0 说明有文件数据
file.SaveAs Server.mappath(formpath&filename) ''保存文件

iCount=iCount+1
end if
set file=nothing
Next
set upload=nothing ''删除此对象

Htmend iCount&" 个文件上传结束!"

sub HtmEnd(Msg)
set upload=nothing
response.write "<font class='logo'>文件上传成功 </font>"

response.end
end sub

%>
怎么没人理我呀,太瞧不起人了怎的????问题已经解决了,你们想发言都没机会了。。。。。再见。。//