ASP 高級模板引擎實現類
2024-05-04 11:00:14
供稿:網友
復制代碼 代碼如下:
Class template
Private c_Char, c_Path, c_FileName, c_Content, c_PageUrl, c_CurrentPage, c_PageStr, ReplacePageStr
Private TagName
' ***************************************
' 設置編碼
' ***************************************
Public Property Let Char(ByVal Str)
c_Char = Str
End Property
Public Property Get Char
Char = c_Char
End Property
' ***************************************
' 設置模板文件夾路徑
' ***************************************
Public Property Let Path(ByVal Str)
c_Path = Str
End Property
Public Property Get Path
Path = c_Path
End Property
' ***************************************
' 設置模板文件名
' ***************************************
Public Property Let FileName(ByVal Str)
c_FileName = Str
End Property
Public Property Get FileName
FileName = c_FileName
End Property
' ***************************************
' 獲得模板文件具體路徑
' ***************************************
Public Property Get FilePath
If Len(Path) > 0 Then Path = Replace(Path, "/", "/")
If Right(Path, 1) <> "/" Then Path = Path & "/"
FilePath = Path & FileName
End Property
' ***************************************
' 設置分頁URL
' ***************************************
Public Property Let PageUrl(ByVal Str)
c_PageUrl = Str
End Property
Public Property Get PageUrl
PageUrl = c_PageUrl
End Property
' ***************************************