世上最坑爹的玩意:关于asp中灌水的代码看不懂,望高手帮忙!

来源:百度文库 编辑:高考问答 时间:2024/05/05 08:57:29
以下是代码:
posttime=5
if cint(posttime)<>0 then
if not isnull(session("posttime")) or cint(posttime)>0 then
if DateDiff("s",session("posttime"),Now())<cint(posttime) then
MessageBox "错误信息:留言本防灌水功能已经打开,限制"&posttime&"秒内不能重复留言。"
response.end
end if
end if
谢谢大家帮忙!
end if

posttime=5 '设置时间为5秒
if cint(posttime)<>0 then '如果时间不为0那么
if not isnull(session("posttime")) or cint(posttime)>0 then '如果session中的posttime不为空或posttime大于0那么
if DateDiff("s",session("posttime"),Now())<cint(posttime) then '如果现在的时间(now())与session中的时间相差秒数小于posttime那么
MessageBox "错误信息:留言本防灌水功能已经打开,限制"&posttime&"秒内不能重复留言。" '提示错误消息
response.end '停止response
end if
end if
谢谢大家帮忙!
end if

posttime=5
设置灌水时间间隔
if cint(posttime)<>0 then
判断灌水时间是否为0
if not isnull(session("posttime")) or cint(posttime)>0 then
如果提交时间不为空而且大于0那么
if DateDiff("s",session("posttime"),Now())<cint(posttime) then
记录当前时间
MessageBox "错误信息:留言本防灌水功能已经打开,限制"&posttime&"秒内不能重复留言。"
如果错误报错
response.end
显示信息
end if
结束if
end if
结束if语句
谢谢大家帮忙!
end if