紧急求救《化境ASP无组件上传类的使用,多文件文字上传到空间,在线等
紧急求救《化境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>