ASP关键词代码问题

来源:百度知道 编辑:UC知道 时间:2024/05/26 06:57:06
我想屏蔽掉某些 关键词,比如:ABC 请高手帮我看看以下代码有无错误, 我是直接在信息发布文件fabu.asp
里 引用的

<!--#include file="check.asp" -->

check.asp里面的代码如下:
<%
Dim Fy_Post2,Fy_Get2,Fy_In2,Fy_Inf2,Fy_Xh2,Fy_db2,Fy_dbstr2
Fy_In2 = "|ABC|"
%>
<%
Fy_Inf2 = split(Fy_In2,"|")
'--------POST部份------------------
If Request.Form<>"" Then
For Each Fy_Post2 In Request.Form

For Fy_Xh2=0 To Ubound(Fy_Inf2)
If Instr(LCase(Request.Form(Fy_Post2)),Fy_Inf2(Fy_Xh2))<>0 Then

Response.Write "<Script Language=JavaScript>alert('系统提示↓\n\n请不要发布不良信息');</Script>"
response.write "<br><br><br><br><br><br><br><br>"
response.write "<center><a href=index.asp><font color=blue>返回首页</h></a></center>"
Response.End
End If
Next<

If Instr(LCase(Request.Form(Fy_Post2)),Fy_Inf2(Fy_Xh2))<>0 Then
修改为
If Instr(LCase(Request.Form(Fy_Post2)),Fy_Inf2(Fy_Xh2))<>"" Then

<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<form name="form1" method="post" action="">
<label>
<input type="text" name="textfield">
</label>
<label>
<input type="submit" name="Submit" value="提交">
</label>
</form>

<%
Dim Fy_Post2,Fy_Get2,Fy_In2,Fy_Inf2,Fy_Xh2,Fy_db2,Fy_dbstr2
Fy_In2 = "ABC|"
%>
<%
Fy_Inf2 = split(Fy_In2,"|")
'--------POST部份------------------
If Request.Form<>"" Then
i=1
For Each Fy_Post2 In Request.Form

For Fy_Xh2=0 To Ubound(Fy_Inf2)
response.Write i&"次-"&Inst