注册 | 登录 | 设为首页 | 加入收藏
您当前的位置:飞翔学院-IT中国 → 编程开发Asp → 文章内容

给你一段代码,过滤输入特殊符号,保治百病(:)

作者:IT 来源:不详 发布时间:2007-9-2 0:39:21
   function eck(str)
    rem 检查过滤所有的输入
    dim dist
    dist=replace(str,"'","''")
    dist=replace(dist,"<","<")
    dist=replace(dist,">",">")
    dist=replace(dist,"chr(60)","<")
    dist=replace(dist,"chr(37)",">")
    dist=replace(dist,"""",""")
    dist=replace(dist,";",";;")
    eck=dist
   end function


sub showBody(Str)'多行文本显示函数
    str=replace(str,chr(13),"<br>" & chr(13)+chr(10))
    str=replace(str,chr(32)," ")
    response.write str
end sub
http://www.itcnw.com/
  • 打印文档
  • 推荐好友
  • 返回顶部
  • 增大字体
  • 减少字体
关于本站 | 工作机会 | 合作网站 | 广告服务 | 市场合作| 联系我们 | 抽奖活动
版权所有: 武汉威俊科技有限公司 Copyright 2005-2007 www.ITCNW.COM All rights reserved