ASP 高级模板引擎实现类(9)



                        If Int(Len(c_PageStr)) > 0 Then
                            ReplacePageStr = Array("<page:" & Trim(PageID) & "/>", c_PageStr)
                        Else
                            ReplacePageStr = Array("<page:" & Trim(PageID) & "/>", "")
                        End If
                    Else
                        TextLeft = 0
                        TextRight = UBound(Text, 2)
                    End If

                    For i = TextLeft To TextRight
                        TempText = TempText & ItemReSec(i, SubMatchText, Text)        ' 加载模板内容
                    Next
                End If
            Next
            ItemTemplate = TempText
        Else
            ItemTemplate = ""
        End If
        Set Matches = Nothing
    End Function

    ' ***************************************
    '    替换模板字符串
    ' ***************************************
    Private Function ItemReSec(ByVal i, ByVal Text, ByVal Arrays)
        Dim Matches, SubMatches

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/2094.html