JumboTCMS_src/JumboTCMS.Utils/XmlCOM.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/*
* 程序名称: JumboTCMS(将博内容管理系统通用版)
*
* 程序版本: 7.x
*
* 程序作者: 子木将博 (QQ:791104444@qq.com,仅限商业合作)
*
* 版权申明: http://www.jumbotcms.net/about/copyright.html
*
* 技术答疑: http://forum.jumbotcms.net/
*
*/
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Web;
using System.IO;
namespace JumboTCMS.Utils
{
public static class XmlCOM
{
public static DataSet ReadXml(string path)
{
DataSet ds = new DataSet();
FileStream fs = null;
StreamReader reader = null;
try
{
fs = new FileStream(path, FileMode.Open, FileAccess.Read);
reader = new StreamReader(fs, System.Text.Encoding.UTF8);
ds.ReadXml(reader);
return ds;
}
finally
{
fs.Close();
reader.Close();
}
}
/// <summary>
/// 读取Config参数
/// </summary>
public static string ReadConfig(string name, string key)
{
System.Xml.XmlDocument xd = new System.Xml.XmlDocument();
xd.Load(HttpContext.Current.Server.MapPath(name + ".config"));
System.Xml.XmlNodeList xnl = xd.GetElementsByTagName(key);
if (xnl.Count == 0)
return "";
else
{
System.Xml.XmlNode mNode = xnl[0];
return mNode.InnerText;
}
}
/// <summary>
/// 保存Config参数
后面还有 18 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。