当前位置: 代码迷 >> ASP >> IF语句有关问题。怎么阻止垃圾信息
  详细解决方案

IF语句有关问题。怎么阻止垃圾信息

热度:105   发布时间:2012-03-20 14:01:11.0
IF语句问题。。如何阻止垃圾信息?
我做了个供求信息,但有很多垃圾信息发布。    
 
如何用IF语句阻止垃圾信息写入数据库。    
 
  谢谢各位了。。

------解决方案--------------------
dim rubbish
dim content

content=request.form( "content ") '内容
rubbish=array( "电视 ", "物流 ") '垃圾信息数组

for i=0 to ubound(rubbish)
if instr(content,rubbish(i))> 0 then
Response.Write " <script> alert( " "发布信息中含有垃圾信息 " ");history.back() </script> "
Response.End
end if
next
  相关解决方案