请问这段代码是什么意思哦。。。。
<%Functionc2u(sGBStr)Dimi,cifsGBStr<>""thenFori=1toLen(sGBStr)c=Mid(sGBStr,i,1)ifc=ch...
<%
Function c2u(sGBStr)
Dim i,c
if sGBStr<>"" then
For i = 1 to Len(sGBStr)
c = Mid(sGBStr,i,1)
if c=chr(13) then
c2u = c2u & "<br/>"
else
c2u = c2u & "" & Hex(AscW(c)) & ";"
end if
Next
end if
End Function
'过滤字符写入数据库USB
function usb(str)
str=trim(str)
if IsNull(str) then exit function
str=replace(str,"","")
str=replace(str," ","")
str=replace(str,"∧","")
str=replace(str,"Ψ","")
str=replace(str,"","")
str=replace(str,Chr(13),"\")
usb=str
end function
'标题和编辑UBB
function ubb(str)
str=trim(str)
if IsNull(str) then exit function
str=replace(str,"&","&")
str=replace(str,"<","<")
str=replace(str,">",">")
str=replace(str,"'","'")
str=replace(str,"""",""")
str=replace(str,"$","$$")
str=replace(str," ","")
str=replace(str,Chr(13),"<br/>")
ubb=str
end function
'内容UBB2
function ubb2(str)
if IsNull(str) then exit function
str=trim(str)
str=replace(str,"&","&")
str=replace(str,"<","<")
str=replace(str,">",">")
str=replace(str,"'","'")
str=replace(str,"""",""")
str=replace(str,"$","$$")
str=replace(str," ","")
str=replace(str,Chr(13),"<br/>")
Set re=new RegExp
re.IgnoreCase =true
re.Global=True
re.pattern="(\(img)\)(.{5,}?)\(/img\)"
str= re.Replace(str,"<img src=""$2"" alt=''/><br/>")
re.pattern="(\(url\))([A-Za-z0-9\./=\?%\-&_~`@':+!;*()#]+)(\(\/url\))"
str= re.Replace(str,"<a href=""out.asp?uurl=$2"" >$2</a>")
re.pattern="(\(url=)([A-Za-z0-9\./=\?%\-&_~`@':+!;*()#]+)\)(.+?)(\(\/url\))"
str= re.Replace(str,"<a href=""out.asp?uurl=$2"" >$3</a>")
re.pattern="(\(c\))(.[^\[]*)(\(\/c\))"
str= re.Replace(str,"<a href=""wtai://wp/mc;$2"" >$2</a>")
re.pattern="(\(c=(.[^\]]*)\))(.[^\[]*)(\(\/c\))"
str= re.Replace(str,"<a href=""wtai://wp/mc;$2"" >$3</a>")
re.pattern="(\(u\))(.[^\[]*)(\(\/u\))"
str= re.Replace(str,"<u>$2</u>")
re.pattern="(\(b\))(.[^\[]*)(\(\/b\))"
str= re.Replace(str,"<b>$2</b>")
re.pattern="(\(i\))(.[^\[]*)(\(\/i\))"
str= re.Replace(str,"<i>$2</i>")
re.Pattern="(\\)"
str= re.Replace(str,"<br/>")
set re=Nothing
ubb2=str
end function
%>
请问以上代码是什么意思哦
我才刚学asp。因为最近弄了个wap站。很多东西都不懂。。经常被刷流量。又不懂什么叫防sql.....-_-! 展开
Function c2u(sGBStr)
Dim i,c
if sGBStr<>"" then
For i = 1 to Len(sGBStr)
c = Mid(sGBStr,i,1)
if c=chr(13) then
c2u = c2u & "<br/>"
else
c2u = c2u & "" & Hex(AscW(c)) & ";"
end if
Next
end if
End Function
'过滤字符写入数据库USB
function usb(str)
str=trim(str)
if IsNull(str) then exit function
str=replace(str,"","")
str=replace(str," ","")
str=replace(str,"∧","")
str=replace(str,"Ψ","")
str=replace(str,"","")
str=replace(str,Chr(13),"\")
usb=str
end function
'标题和编辑UBB
function ubb(str)
str=trim(str)
if IsNull(str) then exit function
str=replace(str,"&","&")
str=replace(str,"<","<")
str=replace(str,">",">")
str=replace(str,"'","'")
str=replace(str,"""",""")
str=replace(str,"$","$$")
str=replace(str," ","")
str=replace(str,Chr(13),"<br/>")
ubb=str
end function
'内容UBB2
function ubb2(str)
if IsNull(str) then exit function
str=trim(str)
str=replace(str,"&","&")
str=replace(str,"<","<")
str=replace(str,">",">")
str=replace(str,"'","'")
str=replace(str,"""",""")
str=replace(str,"$","$$")
str=replace(str," ","")
str=replace(str,Chr(13),"<br/>")
Set re=new RegExp
re.IgnoreCase =true
re.Global=True
re.pattern="(\(img)\)(.{5,}?)\(/img\)"
str= re.Replace(str,"<img src=""$2"" alt=''/><br/>")
re.pattern="(\(url\))([A-Za-z0-9\./=\?%\-&_~`@':+!;*()#]+)(\(\/url\))"
str= re.Replace(str,"<a href=""out.asp?uurl=$2"" >$2</a>")
re.pattern="(\(url=)([A-Za-z0-9\./=\?%\-&_~`@':+!;*()#]+)\)(.+?)(\(\/url\))"
str= re.Replace(str,"<a href=""out.asp?uurl=$2"" >$3</a>")
re.pattern="(\(c\))(.[^\[]*)(\(\/c\))"
str= re.Replace(str,"<a href=""wtai://wp/mc;$2"" >$2</a>")
re.pattern="(\(c=(.[^\]]*)\))(.[^\[]*)(\(\/c\))"
str= re.Replace(str,"<a href=""wtai://wp/mc;$2"" >$3</a>")
re.pattern="(\(u\))(.[^\[]*)(\(\/u\))"
str= re.Replace(str,"<u>$2</u>")
re.pattern="(\(b\))(.[^\[]*)(\(\/b\))"
str= re.Replace(str,"<b>$2</b>")
re.pattern="(\(i\))(.[^\[]*)(\(\/i\))"
str= re.Replace(str,"<i>$2</i>")
re.Pattern="(\\)"
str= re.Replace(str,"<br/>")
set re=Nothing
ubb2=str
end function
%>
请问以上代码是什么意思哦
我才刚学asp。因为最近弄了个wap站。很多东西都不懂。。经常被刷流量。又不懂什么叫防sql.....-_-! 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询