紧急求救《化境ASP无组件上传类的使用,多文件文字上传到空间,在线等

hudeqiang 2005-01-04 02:38:30
紧急求救《化境ASP无组件上传类的使用,多文件文字上传到空间
要的是多文件上传,和文字一起,只成功了一次,后来怎么也不行了,请各位大虾们帮一下们

------------------这是我只成功了一次的程序--------------------
只能上传一张图片
-------------up.asp-------------------------
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>

<body>
<form name="form1" method="post" action="save.asp" enctype="multipart/form-data">
<input type="hidden" name="filepath" value="images/">
<table width="100%" height="194" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><input name="pic" type="FILE" class="line" id="pic4" style="width:400" size="50"></td>
</tr>
<tr>
<td><input name="pic" type="FILE" class="line" id="pic5" style="width:400" size="50"></td>
</tr>
<tr>
<td><input type="submit" name="Submit" value="提交">
<input type="reset" name="Submit2" value="重置"></td>
</tr>
</table>
</form>
</body>
</html>


-------------------save.asp----------------
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>

<body>
<!--#include file="../../include/conn.asp" -->
<!--#include file="../news/upload.inc"-->
<%
set upload=new upload_5xSoft
formPath=upload.form("filepath")
if right(formPath,1)<>"/" then
formPath=formPath&"/"
end if


''列出所有form数据
for each pic in upload.objForm
response.write formName&"="&upload.objForm(formName)&"<br>"
next

''列出所有文件
for each pic in upload.objFile
set file=upload.objFile(pic)
if file.FileSize>0 then
file.SaveAs Server.mappath(formPath&file.FileName)
response.write file.FilePath&file.FileName&" ("&file.FileSize&") => "
response.write file.FileName&" 成功!<br>"
end if
set file=nothing
next
set upload=nothing
%>

</body>
</html>
...全文
75 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
hudeqiang 2005-01-04
  • 打赏
  • 举报
回复
倒,没个人的

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧