MxWeiXinPF.Templates/GeneralFun.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/**************************************
*
* author:李朴
* company:上海沐雪网络科技有限公司
* website:http://uweixin.cn
* createDate:2013-11-1
* update:2014-12-30
* remark:模板处理的一些公共方法
*
***********************************/
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
namespace MxWeiXinPF.Templates
{
public class GeneralFun
{
/// <summary>
/// 读取HTML文件内容
/// </summary>
/// <param name="Path">物理路径</param>
/// <returns></returns>
public static string ReadHtml(string Path)
{
string result = string.Empty;
if (File.Exists(Path))
{
try
{
using (StreamReader sr = new StreamReader(Path))
{
result = sr.ReadToEnd();
}
}
catch
{ }
}
else
{
result = "模板不存在!";
}
return result;
}
/// <summary>
/// 写HTML文件
/// </summary>
/// <param name="Content">内容</param>
/// <param name="FilePath">物理路径</param>
public static void WriteHtml(string Content, string FilePath)
{
string getContent = "";
try
后面还有 18 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
