asp中的INC文件

来源:百度知道 编辑:UC知道 时间:2024/05/07 14:43:13
在面有一个INC文件, 大家帮我看一下是什么意思.我是新手,不太明白这个INC有什么用.INC里的是:

<%
function htmlencode2(str)
dim result
dim l
if isNULL(str) then
htmlencode2=""
exit function
end if
l=len(str)
result=""
dim i
for i = 1 to l
select case mid(str,i,1)
case "<"
result=result+"<"
case ">"
result=result+">"
case chr(13)
result=result+"<br>"
case chr(34)
result=result+"""
case "&"
result=result+"&"
case chr(32)
'result=result+" "
if i+1<=l and i-1>0 then
if mid(str,i+1,1)=chr(32) or mid(str,i+1,1)=chr(9) or mid(str,i-1,1)=chr(32) or mid(str,i-1,1)=chr(9) then
result=result+" "
else
result=result+" "
end if
else
result=result+" "
end if

对输入普通字符串作些处理,转换为html格式的写法。

晕啊,我看的都头昏^^^^^
于是我瞟了一眼就把它复制到DREAMWARE里面,按F12,
结果,报错:
Microsoft VBScript 编译器错误 错误 '800a0409'

未结束的字符串常量

/nows/TEST.ASP,行 21

result=result+"""
-----------------^

这代码本来有问题啊,各位~~~~~