App_Code/common2/common/Template.cs

(开头部分) 9KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Configuration;
using System.Collections.Specialized;
using System.Text;
using System.IO;
using System.Data;

namespace RM.Common
{
    public class Template : NameValueCollection
    {
        private string TemplateUrl, CacheUrl, BufText;
        private string[] ListTpl;
        private bool Utf8Encode;

        #region //结造函数
        public Template()
        {
            this.funcInit();
        }

        public Template(string tplFileName, string cacheFileName)
        {
            this.funcInit();
            this.setTemplateFile(tplFileName);
            this.setCacheFile(cacheFileName);
        }
        #endregion


        #region//初始化
        /// <summary>
        /// 初始化函数
        /// </summary>
        private void funcInit()
        {
            Utf8Encode = false;
        }

        /// <summary>
        /// 设置保存文件路径
        /// </summary>
        /// <param name="cacheFileName"></param>
        public void setCacheFile(string cacheFileName)
        {
            this.CacheUrl = System.Web.HttpContext.Current.Server.MapPath(ConfigurationManager.AppSettings["CacheUrl"] + cacheFileName);
        }

        /// <summary>
        /// 设置模板文件路径,并载入模板,替换包含文件
        /// </summary>
        /// <param name="tplFileName"></param>
        public void setTemplateFile(string tplFileName)
        {
            this.TemplateUrl = System.Web.HttpContext.Current.Server.MapPath(ConfigurationManager.AppSettings["TemplateUrl"] + tplFileName);
            this.BufText = Files.loadFile(this.TemplateUrl);
            this.SetIncludeFile();
        }
        #endregion

后面还有 163 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。