分享

写回答

发帖

[提问] 请大家帮忙看看conn.asp是否正确

GoDaddy GoDaddy 822 人阅读 | 2 人回复

发表于 2010-6-5 12:10:23 | 显示全部楼层 |阅读模式

Godaddy客服回复web.config自查错误原因

http://free-album.info/上传web.config后显示

Microsoft JET Database Engine error '80004005'

'D:\Hosting\6257024\html\bbhtgl\%^&$%\#.mdb' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.

/conn.asp, line 8


所以conn.asp修改为

<%
'option explicit
dim startime,conn,connstr,db,rs,rs_s,rs_s1
startime=timer()
db="/access_db/#.mdb"
Set conn = Server.CreateObject("ADODB.Connection")
connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(""&db&"")
conn.Open connstr

                set rs_2=server.CreateObject("adodb.recordset")
                rs_2.open "select * from system",conn,1,1
                if not rs_2.eof then
                        banquan=rs_2("banquan")
                        beian=rs_2("beian")
                        zzywz=rs_2("zzywz")
                        kfqq=rs_2("qq")
                        kfemail=rs_2("email")
                        kftel=rs_2("tel")
                        kfdpdz=rs_2("dpdz")
                        kfww=rs_2("ww")
                     
                                                fang=rs_2("fang")
                end if       
                rs_2.close
                set rs_2=nothing
%>

<% url="http://" & Request.ServerVariables("HTTP_HOST") & Mid(Request.ServerVariables("URL"),1,InStrRev(Request.ServerVariables("URL"),"/"))
HomeUrl=url
Session("HomeUrl")=HomeUrl %>


修改后还是500错误,而且没有任何详细报错信息? 只有500错误

回答|共 2 个

33115096

发表于 2010-6-5 12:35:55 | 显示全部楼层

最郁闷的是不知道错在哪里

add.c

发表于 2010-6-5 13:33:22 | 显示全部楼层

connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(""&db&"")
这个地址直接改为绝对地址吧
您需要登录后才可以回帖 登录 | 注册

本版积分规则