帮忙看看这段ASP的代码错在哪里?
来源:百度知道 编辑:UC知道 时间:2024/05/16 20:14:41
ForumID=int(Request("ForumID"))
TopicCount=int(Request("TopicCount"))
TitleLen=int(Request("TitleLen"))
TimeLimit=int(Request("TimeLimit"))
Sort=Server.HTMLEncode(Request("Sort"))
if Sort = empty then
SqlSort="ID"
else
SqlSort=Sort
end if
if TitleLen=empty then
SqlTitleLen=100
else
SqlTitleLen=TitleLen
end if
if TopicCount=empty then
SqlTopicCount=10
else
SqlTopicCount=TopicCount
end if
if ForumID<>empty then SqlForumID=" and ForumID="&ForumID&""
if TimeLimit<>empty then SqlTimeLimit=" and PostTime>"&SqlNowString&"-"&TimeLimit&""
if Len(SqlSort)>10 or TopicCount>100 then Response.End
sql="select top "&SqlTopicCount&" * from [BBSXP_Threads] where IsDel=0 "&SqlForumID&" "&SqlTimeL
TopicCount=int(Request("TopicCount"))
TitleLen=int(Request("TitleLen"))
TimeLimit=int(Request("TimeLimit"))
Sort=Server.HTMLEncode(Request("Sort"))
if Sort = empty then
SqlSort="ID"
else
SqlSort=Sort
end if
if TitleLen=empty then
SqlTitleLen=100
else
SqlTitleLen=TitleLen
end if
if TopicCount=empty then
SqlTopicCount=10
else
SqlTopicCount=TopicCount
end if
if ForumID<>empty then SqlForumID=" and ForumID="&ForumID&""
if TimeLimit<>empty then SqlTimeLimit=" and PostTime>"&SqlNowString&"-"&TimeLimit&""
if Len(SqlSort)>10 or TopicCount>100 then Response.End
sql="select top "&SqlTopicCount&" * from [BBSXP_Threads] where IsDel=0 "&SqlForumID&" "&SqlTimeL
好象empty 不是这样用的吧
如:
if Sort = empty then 应改成
if IsEmpty(Sort) then
或者 if Sort="" then
也许我说的不对,后面的代码我没有仔细看,如果说的不对,不要指责我,谢谢!!