Common/Install.cs

(完整代码) 1KB

using System.IO;
using System.Web;
using System.Xml;


namespace Kscor.Common
{
    public class Install
    {
        public bool CheckConn()
        {
            bool flag = false;
            FileInfo info = new FileInfo(HttpRuntime.AppDomainAppPath + "/web.config");
            if (info.Exists)
            {
                    XmlDocument document = new XmlDocument();
                    document.Load(info.FullName);
                    XmlNode node = document.SelectSingleNode("//connectionStrings");
                    if (node.HasChildNodes)
                    {
                        for (int i = 0; i < node.ChildNodes.Count; i++)
                        {
                            XmlNode node2 = node.ChildNodes[i];
                            if (node2.Name == "add" && node2.Attributes.GetNamedItem("name").Value == Kscor.Common.Config.KscorConn)
                            {
                                return true;
                            }
                        }
                    }
            }
            return flag;
        }
    }
}

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

AI 解读 AI

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

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