ASP同时上传图片和内容怎样实现????
怎样实现图片和内容同时上传!!如类似以下网址:http://beijing.263.com/send1.aspx?name=jzqiuzhi求类似的代码。可以将图片和内容...
怎样实现 图片和内容同时上传!!
如类似以下网址:
http://beijing.263.com/send1.aspx?name=jzqiuzhi
求类似的代码。可以将图片和内容同时上传的,谢谢!!!!
或者是有可以将图片和内容同时上传的代码也可以。。。。谢谢! 展开
如类似以下网址:
http://beijing.263.com/send1.aspx?name=jzqiuzhi
求类似的代码。可以将图片和内容同时上传的,谢谢!!!!
或者是有可以将图片和内容同时上传的代码也可以。。。。谢谢! 展开
2个回答
展开全部
使用风声无组件上传类可以实现。
<%
Server.ScriptTimeout=999
%>
<!--#include file="../UpLoadClass.asp"-->
<%
dim strFile1
time1=timer()
Set myrequest=new UpLoadClass
myrequest.MaxSize = 5000*1024
myrequest.FileType = ""
myrequest.Savepath = "../ziliao/"
myrequest.open
strFile1=myrequest.Form("zphoto")
intError=myrequest.Form("zphoto_Err")
%>
<%
strztitle=replace(replace(left(myrequest.Form("ztitle"),100),"<","["),">","]")
strztype=replace(replace(left(myrequest.Form("ztype"),100),"<","["),">","]")
strwriter=replace(replace(left(myrequest.Form("writer"),100),"<","["),">","]")
strpublictime=replace(replace(left(myrequest.Form("publictime"),100),"<","["),">","]")
strzclink=replace(replace(left(myrequest.Form("zclink"),100),"<","["),">","]")
strshowdate=replace(replace(left(myrequest.Form("showdate"),100),"<","["),">","]")
strztype2=replace(replace(left(myrequest.Form("ztype2"),100),"<","["),">","]")
strfootnote=myrequest.Form("footnote")
%>
<%
Set myrequest=nothing
set rs=server.CreateObject("adodb.recordset")
sql="select * from ziliao"
rs.open sql,conn,1,3
rs.addnew
rs("ztitle")=strztitle
rs("ztype")=strztype
rs("writer")=strwriter
rs("publictime")=strpublictime
rs("zclink")=strzclink
rs("showdate")=strshowdate
rs("ztype2")=strztype2
rs("footnote")=strfootnote
rs("realwriter")=session("adminname")
rs("zphoto")=strFile1
rs.update
rs.close
conn.close()
set conn=nothing
%>
UpLoadClass.asp这个文件你在百度找。找“无声无组件上传”可以找到。要是实在找不到找我要
在表单里面要加一个<form action="ziliaosave.asp" method="post" enctype="multipart/form-data" name="myform">才可以正常使用
<%
Server.ScriptTimeout=999
%>
<!--#include file="../UpLoadClass.asp"-->
<%
dim strFile1
time1=timer()
Set myrequest=new UpLoadClass
myrequest.MaxSize = 5000*1024
myrequest.FileType = ""
myrequest.Savepath = "../ziliao/"
myrequest.open
strFile1=myrequest.Form("zphoto")
intError=myrequest.Form("zphoto_Err")
%>
<%
strztitle=replace(replace(left(myrequest.Form("ztitle"),100),"<","["),">","]")
strztype=replace(replace(left(myrequest.Form("ztype"),100),"<","["),">","]")
strwriter=replace(replace(left(myrequest.Form("writer"),100),"<","["),">","]")
strpublictime=replace(replace(left(myrequest.Form("publictime"),100),"<","["),">","]")
strzclink=replace(replace(left(myrequest.Form("zclink"),100),"<","["),">","]")
strshowdate=replace(replace(left(myrequest.Form("showdate"),100),"<","["),">","]")
strztype2=replace(replace(left(myrequest.Form("ztype2"),100),"<","["),">","]")
strfootnote=myrequest.Form("footnote")
%>
<%
Set myrequest=nothing
set rs=server.CreateObject("adodb.recordset")
sql="select * from ziliao"
rs.open sql,conn,1,3
rs.addnew
rs("ztitle")=strztitle
rs("ztype")=strztype
rs("writer")=strwriter
rs("publictime")=strpublictime
rs("zclink")=strzclink
rs("showdate")=strshowdate
rs("ztype2")=strztype2
rs("footnote")=strfootnote
rs("realwriter")=session("adminname")
rs("zphoto")=strFile1
rs.update
rs.close
conn.close()
set conn=nothing
%>
UpLoadClass.asp这个文件你在百度找。找“无声无组件上传”可以找到。要是实在找不到找我要
在表单里面要加一个<form action="ziliaosave.asp" method="post" enctype="multipart/form-data" name="myform">才可以正常使用
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询