<%
Function th (str)
Str = replace (str, "Mom", "MD ")
Str = replace (str, "by", "KAO ")
Th = str
End function
Function encode (str)
Str = replace (str, ">", "> ")
Str = replace (str, "<", "<")
Str = Replace (str, CHR (32 ),"")
Str = Replace (str, CHR (13 ),"")
Str = Replace (str, CHR (10) & CHR (10), "</P> <P> ")
Str = Replace (str, CHR (10), "<BR> ")
Encode = str
End function
%>
<% Title = request. form ("title ")
Content = request. form ("content") %>
Article title: <% = th (title) %> Article content: <% = encode (th (content) %>
Th (str) is a user-defined function. Its main function is simple: Filter characters. Encode (str) is also a custom function.
Number, the main function is to completely display the transmitted information.
CHR (10) indicates line feed, CHR (13) indicates carriage return, and CHR (32) indicates space.
Additional function: displays the UBB code.
Ubb. asp contains the ubb () function.
Enhanced cnbruce. asp
<! -- # Include file = "http://www.cnbruce.com/blog/ubb.asp" -->
<%
Function th (str)
Str = replace (str, "Mom", "MD ")
Str = replace (str, "by", "KAO ")
Th = str
End function
%>