[ASP]生成静态页的最终类

作者在 2007-04-11 17:27:00 发布以下内容

Class MarkHTML

       Private mUrlStr'网页的URL地址

       Private mTemplateBody'模板文件替换后的HTML代码    

       Private mFilePath'生成网页的文件路径

       Private mFileName'生成网页的文件名 '类初始化过程

        Private Sub Class_Initialize

                   mUrlStr=""

                   mTemplateBody=""

                   mFilePath=""

                   mFileName=""

           End Sub

            'FSO方法生成网页

            Public Function FSOMetHod()

                   Dim FSO,wFSO

                   Set FSO=Server.CreateObject("Scripting.FileSystemObject")

                   Set wFSO=FSO.CreateTextFile(FilePath&FileName)

                   wFSO.Write mTemplateBody

                    wFSO.Close

                    Set wFSO=Nothing

                    Set FSO=Nothing

            End Function

            'XMLHttp方法生网页

            '参数生成模式FSO,ADOStream

            Public Function XMLHttpMetHod(MarkMode)

                     Dim XMLHttp

                     Set XMLHttp=Server.CreateObject("Microsoft.XMLHTTP")

                     XMLHttp.Open "Get",mUrlStr,False

                     XMLHttp.Send

                     mTemplateBody=XMLHttp.responseHTML

                     Select Case MrakMode

                              Case "FSO"

                                  

默认分类 | 阅读 3961 次
文章评论,共0条
游客请输入验证码
浏览141430次
文章分类