我在动网下载了一个小型asp论坛,我很喜欢,在本地机上用pws测试正常,可上传到我的asp空间后,在浏览器中打不开index.asp首页,报页面有问题,但能打开其他页面,数据库路径没有问题,我实在不知道是什么原因,望高手帮忙,向你致谢了。
例如能打开的页面:http://free.2925.net/nathan/login.asp,不能打开index.asp,此论坛的下载地址:http://www.aspsky.net/download/list.asp?id=667
附上首页index.asp的代码:
<%Server.ScriptTimeout=300
id=Trim(Request.QueryString("id"))
fc=Trim(Request.QueryString("fc"))
if fc="" then fc="FFFF00"
bg=Trim(Request.QueryString("bg"))
if bg="" then bg="000000"
bc=Trim(Request.QueryString("bc"))
if bc="" then bc="00FF00"
sername=Request.ServerVariables("SERVER_NAME")
scrname=Request.ServerVariables("SCRIPT_NAME")
linkurl="http://" & sername & scrname
%><%
countfile=server.mappath("online.txt")
Set fs=CreateObject("Scripting.FileSystemObject")
n=Year(date())
y=Month(date())
r=Day(date())
s=Hour(time())
f=Minute(time())
m=Second(time())
if len(y)=1 then y="0" & y
if len(r)=1 then r="0" & r
if len(s)=1 then s="0" & s
if len(f)=1 then f="0" & f
if len(m)=1 then m="0" & m
sj = n & "-" & y & "-" & r & " " & s & ":" & f & ":" & m
dim ly()
Set thisfile=fs.OpenTextFile(countfile,1,False)
countly=0
do while not thisfile.AtEndOfStream
thisline = thisfile.readline
Redim preserve ly(countly)
ly(countly) = thisline
countly = countly + 1
loop
thisfile.close
sameip=0
for i=1 to (countly-1)/2
if DateDiff("s",ly(i*2),sj)>60 then
ly(i*2-1)=""
ly(i*2)=""
countly=countly-2
end if
if Request.ServerVariables("REMOTE_ADDR")=ly(i*2-1) then
sameip=1
ly(i*2)=sj
end if
next
set outfile=fs.CreateTextFile(countfile)
for i=0 to countly-1
if ly(i)<>"" then
outfile.WriteLine ly(i)
end if
next
if sameip=0 then
outfile.WriteLine Request.ServerVariables("REMOTE_ADDR")
outfile.WriteLine sj
outfile.Close
end if
Set thisfile=fs.OpenTextFile(countfile,1,False)
countly=0
do while not thisfile.AtEndOfStream
thisline = thisfile.readline
Redim preserve ly(countly)
ly(countly) = thisline
countly = countly + 1
loop
thisfile.close
total=(countly-1)/2
%>
<%
if session("username")="" then
online=Request.Cookies("username")
if online="" then
online="客人"
end if
else
online=session("username")
end if
set reco=server.createobject("adodb.recordset")
sqlstr="select * from board"
reco.open sqlstr,conn,1,1
%>
<% response.write title %>
<% dim visitors countfile=server.mappath("count.txt") Set fs = CreateObject ("Scripting.FileSystemObject") Set thisfile = fs.OpenTextFile(countfile) visitors=thisfile.readline thisfile.close visitors=visitors + 1 response.write "总访问量: " response.write visitors & "" Set thisfile = fs.CreateTextFile(countfile) thisfile.WriteLine(visitors) thisfile.close set fs=nothing%> 你最近的访问在: <% response.write year(date)&"年"&month(DATE)&"月"&day(date)&"日"&hour(time())&"时"%> | <% set rsrs = Server.CreateObject("ADODB.Recordset") rsrs.Open "Select * From user_info order by id desc",conn,1,3 %>欢迎最后注册用户: target=_blank><% =rsrs("name") %> <% set rsrs=nothing %>主题总数: <% set a=server.createobject("adodb.recordset") sql_a="select * from book where type=0" a.open sql_a,conn,1,1 response.write a.recordcount a.close set a=nothing %> | 贴子总数: <% set b=server.createobject("adodb.recordset") sql_b="select * from book" b.open sql_b,conn,1,1 response.write b.recordcount b.close set b=nothing %> | 注册会员: <% set rsrs = Server.CreateObject("ADODB.Recordset") rsrs.Open "Select * From user_info",conn,1,3 response.write rsrs.recordcount %> |
| 论坛 | 主题 | 发表 | 最后发表 | 版主 | <% if reco.eof then %>暂 未 有 版 面 ! | <%else do while not reco.eof set c=server.createobject("adodb.recordset") sql_c="select * from book where bid=" &reco("bid") c.open sql_c,conn,1,1 set d=server.createobject("adodb.recordset") sql_d="select * from book where type=0 and bid=" &reco("bid") d.open sql_d,conn,1,1 set f=server.createobject("adodb.recordset") sql_f="select * from book where type=0 and bid=" &reco("bid") &" order by ldate desc" f.open sql_f,conn,1,1 %>response.write "on.gif" alt="有新贴" else response.write "off.gif" alt="没新贴" end if else response.write "off.gif" alt="没新贴" end if %>" alt="<% response.write alt %>"> | " title="进入<%=reco("cname")%>"><%=reco("cname")%> <%=reco("bdinfo")%> | <% =d.recordcount %> | <% =c.recordcount %> | <% if f.eof or f.bof then %>暂未发表<% else %><% =year(f("ldate"))&"-"&month(f("ldate"))&"-"&day(f("ldate"))%><% now()%> <% if f("reply")<>0 then sql="select * from book where type="&f("id")&" order by id desc" set rs1=server.createobject("adodb.recordset") rs1.open sql,conn,1,1 response.write "" response.write rs1("username") response.write "" else response.write "" response.write f("username") response.write "" end if %><% end if %> | <% set rebman=server.createobject("adodb.recordset") bdstr="select * from user_info where level='" &reco("bid")&"'" rebman.open bdstr,conn,1,3 %><% if rebman.eof or rebman.bof then %>暂无<% else %><% =rebman("name") %><% end if %> | <% reco.movenext loop c.close set c=nothing d.close set d=nothing f.close set f=nothing end if %> | 悄悄话管理 | <% set pm=server.createobject("adodb.recordset") pm.open "select * from pm where sendto='" &online&"'",conn,1,1 if pm.eof then %> | 悄悄话 <% =online%> - 您还没有任何悄悄话信息。 | <%else%> | 悄悄话 <% =online%> - 你目前共有 <%=pm.recordcount%> 条悄悄话信息。 | <% pm.close set close=nothing %><%end if%> | 在线用户 | | 当前在线的朋友(<%=total%>) <% =online%> - 现在只有<%=total-1%>个游客和你在这个论坛。 |
|
| 24小时内有新的主题 |
| 24小时内没有新的主题 |
联系我们 |
<% response.write pagename %> |
论坛声明宇锋论坛 © 2000-2001 All Rights Reserved
Powered by FullDown © 2001
<%
reco.close
set reco=nothing
%>