标题:asp读文本的问题
取消只看楼主
mextb1860
Rank: 1
等 级:新手上路
帖 子:179
专家分:0
注 册:2005-7-10
 问题点数:0 回复次数:1 
asp读文本的问题
SUB PrintLine (ByVal strLine)
strLine=server.HTMLEncode(strLine)
strLine=replace(strLine,"&lt;%","<FONT COLOR=#ff0000>&lt;%")
strLine=replace(strLine,"%&gt;","%&gt;</FONT>")
strLine=replace(strLine,"&lt;SCRIPT","<FONT COLOR=#0000ff>&lt;SCRIPT",1,-1,1)
strLine=replace(strLine,"&lt;/SCRIPT&gt;","&lt;/SCRIPT&gt;</FONT>",1,-1,1)
strLine=replace(strLine,"&lt;!--","<FONT COLOR=#008000>&lt;!--",1,-1,1)
strLine=replace(strLine,"--&gt;","--&gt;</FONT>",1,-1,1)
Response.Write strLine
END SUB
Function ShowCode(filename)
Dim strFilename
Dim FileObject, oInStream, strOutput
strFilename = filename
Set FileObject = Server.CreateObject("Scripting.FileSystemObject")
Set oInStream = FileObject.OpenTextFile(strFilename, 1, 0, 0 )
While NOT oInStream.AtEndOfStream
strOutput = oInStream.ReadLine
Call PrintLine(strOutput)
Response.Write("<BR>")
Wend
end function

------------------------------------------------------------------------------------------------------
Set oInStream = FileObject.OpenTextFile(strFilename, 1, 0, 0 )
strLine=replace(strLine,"--&gt;","--&gt;</FONT>",1,-1,1)
这2个括号里的数字参数是什么意思谁可以说下吗
搜索更多相关主题的帖子: strLine 文本 replace FONT 
2006-02-20 23:44
mextb1860
Rank: 1
等 级:新手上路
帖 子:179
专家分:0
注 册:2005-7-10
得分:0 

老大问一下你。你这些资料是在哪里查到的

2006-02-21 12:58



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-46392-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.570830 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved