关于页面显示的文本格式的问题!
<% function HTMLEncode(fString)
if not isnull(fString) then
fString = replace(fString, "> ", "> ")
fString = replace(fString, " < ", "< ")
fString = Replace(fString, CHR(32), " ")
fString = Replace(fString, CHR(34), "" ")
fString = Replace(fString, CHR(39), "' ")
fString = Replace(fString, CHR(13), " ")
fString = Replace(fString, CHR(10) & CHR(10), " </P> <P> ")
fString = Replace(fString, CHR(10), " <BR> ")
HTMLEncode = fString
end if
end function
SQL_Article= "select * from "
set Rn_A=server.createobject( "adodb.recordset ")
Rn_A.open SQL_Article,cn
if Rn_A.eof then
a=1
else
response.write HTMLEncode(Rn_Article( "Article "))
end if
%>
显示结果总提示错误
Microsoft VBScript 编译器错误 错误 '800a03f6 '
缺少 'End '
/iisHelp/common/500-100.asp,行242
Microsoft VBScript 运行时错误 错误 '800a005e '
无效使用 Null: 'replace '
/part/frame.asp,行7
请问是什么问题,往各位指点,在线等,先行谢过。
------解决方案--------------------需要先判断Rn_Article( "Article ")是否为Null
if IsNull(Rn_Article( "Article "))=false Then
response.write HTMLEncode(Rn_Article( "Article "))
end if