常用ASP函数集【经验才是最重要的】(16)


            Err.Clear
            Response.End
        End If

        With viboStream
        .Type = 2
        .Open
        .CharSet = "GB2312"
        .Position = objStream.Size
        .WriteText = FileData
        .SaveToFile Server.MapPath(filename),2
        .Close
        End With
        Set viboStream = Nothing    
    end if
    Response.Write "<div align='center' style=""font-size:12px;font-family:Tahoma;"">恭喜!文件 <a href="""&filename&""" target=""_blank"" style=""font-weight: bold;color: #FF0000;"">"&filename&"</a> 已经生成完毕!...</div>"
    Response.Flush()
End Function

Function CheckBadWord(byVal ChkStr)'过滤脏字
    Dim Str:Str = ChkStr
    Str = Trim(Str)
    If IsNull(Str) Then
        CheckBadWord = ""
        Exit Function
    End If

    DIC = getHTMLPage("include/badWord.txt")'载入脏字词典
    DICArr = split(DIC,CHR(10))
    For i  =0 To Ubound(DICArr )
        WordDIC = split(DICArr(i),"=")
        Str = Replace(Str,WordDIC(0),WordDIC(1))
    next
    CheckBadWord = Str
End function
%>
http://www.zzcn.net/blog/article.asp?id=69

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/3170.html