风声ASP无组件上传类上传图片的问题
风声ASP无组件上传类原来的代码中是没有每张图片的标示的说明的,我想把给张图片都加上去.但是不能写到数据库,代码不知道怎么实现.有用过的朋友请回答一下.多谢了.看我的图片...
风声ASP无组件上传类原来的代码中是没有每张图片的标示的说明的,我想把给张图片都加上去.但是不能写到数据库,代码不知道怎么实现.有用过的朋友请回答一下.多谢了.看我的图片.我可以提供代码大家看.
会的哥们请加我 或发到我的邮箱中 185679929@qq.com 非常感谢了. 展开
会的哥们请加我 或发到我的邮箱中 185679929@qq.com 非常感谢了. 展开
1个回答
展开全部
我这里刚好有个解决方法。,精简一下就是你想要的!
实现两个数据分别传到两个文件
<%@ Language=VBScript %>
<html>
<head>
<meta name="VI60_defaultClientScript" content= "VBScript">
<title></title>
<style>
body {font: 12px/15px "宋体"; color:#444444; margin:0px; padding:0px; background-color:#eeeeee;}
</style>
</head>
<body>
<script id="clientEventHandlersVBS" LANGUAGE="vbscript">
<!--
Sub form1_onsubmit
form2.submit
End Sub
-->
</script>
<table>
<tr>
<td>
<form name="form2" action="ftxt.asp" method="post" style="margin:0px;padding:0px;">
<input type="txt" size="20" name="HH_ftxt" />
</form>
</td>
<td>
<form name="form1" action="HH_upload.asp" method="post" enctype="multipart/form-data" style="margin:0px;padding:0px">
<input type="file" size="15" name="file1" />
<input type= "submit" value="提交" />
</form>
</td>
</tr>
</table>
<body>
</html>
接受文字的文件和图片UPLOAD文件分开
<%
HH_ftxt=request.form("HH_ftxt")
Session("H_ftxt")=HH_ftxt
%>
这个是接受文字的
<!--#include file="UpLoad_Class.vbs.asp"-->
<style>
body {font: 12px/15px "宋体"; color:#444444; margin:0px; padding:0px; background-color:#eeeeee;}
</style>
</head>
<body>
<%
set Ftxt=Nothing
Ftxt=Session("H_ftxt")
dim upload
set upload = new AnUpLoad
upload.Exe = "jpg|bmp|jpeg|gif|png|avi"
upload.MaxSize = 2 * 1024 * 1024 * 1024 '2000M
upload.GetData()
if upload.ErrorID>0 then
response.Write upload.Description
else
dim HH_txt
set HH_txt = upload.files("ftxt")
dim file,savpath
savepath = "upload"
set file = upload.files("file1")
if not(file is nothing) then
if file.saveToFile(savepath,0,true) then
%>
<script language="javascript">
parent.document.form1.xianshi.value=parent.document.form1.xianshi.value+"<%=file.filename%>||<%=Ftxt%>\n";
parent.document.form1.HH_uphide.value=parent.document.form1.HH_uphide.value+"||<%=file.filename%>,<%=Ftxt%>";
</script>
上传成功,文件大小<%=file.size%>字节.<a href="HH_input.asp">[继续上传]</a>
<%
else
response.Write file.Exception
end if
end if
end if
set upload = nothing
set Session("H_ftxt")=nothing
%>
</body>
</html>
这个是接受文件的
还有种方法就是,先传文件再发说明。
实现两个数据分别传到两个文件
<%@ Language=VBScript %>
<html>
<head>
<meta name="VI60_defaultClientScript" content= "VBScript">
<title></title>
<style>
body {font: 12px/15px "宋体"; color:#444444; margin:0px; padding:0px; background-color:#eeeeee;}
</style>
</head>
<body>
<script id="clientEventHandlersVBS" LANGUAGE="vbscript">
<!--
Sub form1_onsubmit
form2.submit
End Sub
-->
</script>
<table>
<tr>
<td>
<form name="form2" action="ftxt.asp" method="post" style="margin:0px;padding:0px;">
<input type="txt" size="20" name="HH_ftxt" />
</form>
</td>
<td>
<form name="form1" action="HH_upload.asp" method="post" enctype="multipart/form-data" style="margin:0px;padding:0px">
<input type="file" size="15" name="file1" />
<input type= "submit" value="提交" />
</form>
</td>
</tr>
</table>
<body>
</html>
接受文字的文件和图片UPLOAD文件分开
<%
HH_ftxt=request.form("HH_ftxt")
Session("H_ftxt")=HH_ftxt
%>
这个是接受文字的
<!--#include file="UpLoad_Class.vbs.asp"-->
<style>
body {font: 12px/15px "宋体"; color:#444444; margin:0px; padding:0px; background-color:#eeeeee;}
</style>
</head>
<body>
<%
set Ftxt=Nothing
Ftxt=Session("H_ftxt")
dim upload
set upload = new AnUpLoad
upload.Exe = "jpg|bmp|jpeg|gif|png|avi"
upload.MaxSize = 2 * 1024 * 1024 * 1024 '2000M
upload.GetData()
if upload.ErrorID>0 then
response.Write upload.Description
else
dim HH_txt
set HH_txt = upload.files("ftxt")
dim file,savpath
savepath = "upload"
set file = upload.files("file1")
if not(file is nothing) then
if file.saveToFile(savepath,0,true) then
%>
<script language="javascript">
parent.document.form1.xianshi.value=parent.document.form1.xianshi.value+"<%=file.filename%>||<%=Ftxt%>\n";
parent.document.form1.HH_uphide.value=parent.document.form1.HH_uphide.value+"||<%=file.filename%>,<%=Ftxt%>";
</script>
上传成功,文件大小<%=file.size%>字节.<a href="HH_input.asp">[继续上传]</a>
<%
else
response.Write file.Exception
end if
end if
end if
set upload = nothing
set Session("H_ftxt")=nothing
%>
</body>
</html>
这个是接受文件的
还有种方法就是,先传文件再发说明。
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询