asp 過濾非法字符函數(shù)
更新時間:2009年02月21日 03:45:57 作者:
過濾非法字符
<%
Function cutbadchar(str)
badstr="不|文|明|字|符|列|表|格|式"
badword=split(badstr,"|")
For i=0 to Ubound(badword)
If instr(str,badword(i)) > 0 then
str=Replace(str,badword(i),"***")
End If
Next
cutbadchar=str
End Function
Response.Write cutbadchar("中國不阿斗發(fā)射點發(fā)明")
%>
Function cutbadchar(str)
badstr="不|文|明|字|符|列|表|格|式"
badword=split(badstr,"|")
For i=0 to Ubound(badword)
If instr(str,badword(i)) > 0 then
str=Replace(str,badword(i),"***")
End If
Next
cutbadchar=str
End Function
Response.Write cutbadchar("中國不阿斗發(fā)射點發(fā)明")
%>
相關(guān)文章
ASP 時間函數(shù)及如何獲取服務(wù)器時間的寫法
本文羅列了一些常用的ASP時間函數(shù)以及如何獲取服務(wù)器時間的寫法,感興趣的朋友可以了解下,就當(dāng)鞏固知識了希望本文對你有所幫助2013-01-01asp動態(tài)include文件,方便多模板的實現(xiàn)
asp動態(tài)include文件,方便多模板的實現(xiàn)...2007-08-08ASP中怎么實現(xiàn)SQL數(shù)據(jù)庫備份、恢復(fù)!
ASP中怎么實現(xiàn)SQL數(shù)據(jù)庫備份、恢復(fù)!...2007-03-03ASP備份SQL Server數(shù)據(jù)庫改進(jìn)版
改進(jìn)的ASP備份SQL Server數(shù)據(jù)庫,網(wǎng)上原理的不是很好,需要的朋友可以參考下。2011-02-02ASP語言實現(xiàn)對SQL SERVER數(shù)據(jù)庫的操作
目前有很多介紹用ASP開發(fā)網(wǎng)絡(luò)數(shù)據(jù)庫的程序例子,但絕大部分是利用ACCESS作底層數(shù)據(jù)庫。相對于ACCESS而言,SQL SERVER數(shù)據(jù)庫系統(tǒng)要復(fù)雜得多,因此在程序開發(fā)中需要多做一些工作。筆者結(jié)合自己開發(fā)管理信息系統(tǒng)的經(jīng)驗,在此試舉一例,與感興趣的朋友共同交流2015-09-09