高手请进解决ASP的一个问题

2025-05-18 12:00:43
推荐回答(2个)
回答(1):


请检查这个文件的调用地址,以及本页面内的函数调用是否正确.

其实我认为无声的无组件上传类更好用.
使用风声无组件上传类可以实现。
<%
Server.ScriptTimeout=999
%>

<%
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这个文件你在百度找。找“无声无组件上传”可以找到。要是实在找不到找我要

在表单里面要加一个

才可以正常使用

回答(2):

下加一句
然后
检查文件路径 file="../../inc/ 里有没有upload_5xsoft.inc 如果没有自己新建一个
你的文件没有问题!语法正确!
还有如果你没有用IIS测试 而是用的别的ASP测试软件可能也会出现上述提示错误!实际上传到网络后可能就没事了!