当前位置: 首页 > news >正文

网站建设咨询服务合同wordpress优化版模板

网站建设咨询服务合同,wordpress优化版模板,南山区,前端做网站需要#x1f680; 优质资源分享 #x1f680; 学习路线指引#xff08;点击解锁#xff09;知识定位人群定位#x1f9e1; Python实战微信订餐小程序 #x1f9e1;进阶级本课程是python flask微信小程序的完美结合#xff0c;从项目搭建到腾讯云部署上线#xff0c;打造一… 优质资源分享 学习路线指引点击解锁知识定位人群定位 Python实战微信订餐小程序 进阶级本课程是python flask微信小程序的完美结合从项目搭建到腾讯云部署上线打造一个全栈订餐系统。Python量化交易实战入门级手把手带你打造一个易扩展、更安全、效率更高的量化交易系统 在程序开发过程中我们一般会用到配置文件来设定一些参数。常见的配置文件格式为 ini, xml, config等。 INI .ini文件通常为初始化文件是用来存储程序配置信息的文本文件。 [Login] #开启加密 0:不开启、1:开启 open\_ssl\_certificate0 .NET 框架本身不支持 INI 文件可以利用 Windows API方法使用平台调用服务来写入和读取文件。 // 要写入的部分名称 - sectionName // 要设置的键名 - key // 要设置的值 - value // INI文件位置 - filepath // 读取是否成功 - result [DllImport(kernel32)] bool WritePrivateProfileString(string sectionName,string key,string value,string filepath);// 要读取的部分名称 - sectionName // 要读取的键名 - key // 如果键不存在返回的默认值 - default // 接收用作缓冲区的字符串 - ReturnedVal // 实际读取的值 - maxsize // INI文件位置 - filepath [DllImport(kernel32)] int GetPrivateProfileString(string sectionName,string key,string default,StringBuilder ReturnedVal,int maxsize,string filepath); 一般会封装一个类来调用该API方法。 public class ReadWriteINIFile{...public void WriteINI(string name, string key, string value){WritePrivateProfileString(name, key, value, _path);}public string ReadINI(string name, string key){StringBuilder sb new StringBuilder(255);int ini GetPrivateProfileString(name, key, , sb, 255, _path);return sb.ToString();} } CFG SharpConfig 是 .NET 的CFG/INI 配置文件操作组件以文本或二进制格式读取修改和保存配置文件和流。 Configuration config Configuration.LoadFromFile(login.cfg); Section section config[Login]; // 读取参数 bool isOpen section[open\_ssl\_certificate].GetValuebool(); // 修改参数 section[open\_ssl\_certificate].Value false; Config 在 App.config/web.config 文件中的 configSections 节点下配置 section 节点.NET 提供自带的类型进行封装。 configSections节点必须为configuration下第一个节点。 NameValue键值对 xml version1.0 encodingutf-8 ? configuration configSections section nameNameValueConfigNode typeSystem.Configuration.NameValueSectionHandler/ configSections NameValueConfigNode add keyName一 valueValue一 / add keyName二 valueValue二 / NameValueConfigNode startup supportedRuntime versionv4.0 sku.NETFramework,Versionv4.6 / startup configuration 定义一个静态属性的方法获取 Dictionary 格式的数据 /// /// NameValueCollection /// public static Dictionarystring, string NameValueConfigNode {get{NameValueCollection nvc (NameValueCollection)ConfigurationManager.GetSection(NameValueConfigNode);Dictionarystring, string result new Dictionarystring,string();foreach (string key in nvc.AllKeys){ result.Add(key, nvc[key]);}return result;} } Dictionary xml version1.0 encodingutf-8 ? configurationconfigSectionssection nameDictionaryConfigNode typeSystem.Configuration.DictionarySectionHandler/configSectionsDictionaryConfigNodeadd keyKey一 valueDictValue一 /add keyKey二 valueDictValue二 /DictionaryConfigNodestartup supportedRuntime versionv4.0 sku.NETFramework,Versionv4.6 /startup configuration /// /// Dictionary /// public static Dictionarystring, string DictionaryConfigNode {get{IDictionary dict (IDictionary)ConfigurationManager.GetSection(DictionaryConfigNode);Dictionarystring, string result new Dictionarystring, string();foreach (string key in dict.Keys){result.Add(key, dict[key].ToString());}return result;} } SingTag xml version1.0 encodingutf-8 ? configurationconfigSectionssection nameSingleTagConfigNode typeSystem.Configuration.SingleTagSectionHandler /configSectionsSingleTagConfigNode PropertyOne1 PropertyTwo2 PropertyThree3 PropertyFour4 PropertyFive5 /startup supportedRuntime versionv4.0 sku.NETFramework,Versionv4.6 /startup configuration /// /// SingleTag /// public static Dictionarystring, string SingleTagConfigNode {get{Hashtable dict (Hashtable)ConfigurationManager.GetSection(SingleTagConfigNode);Dictionarystring, string result new Dictionarystring, string();foreach (string key in dict.Keys){result.Add(key, dict[key].ToString());}return result;} } 自定义配置文件 如果配置文件很多可以单独定义配置文件然后在 App.config/Web.config 文件中声明。 xml version1.0 encodingutf-8 ? configurationconfigSectionssection nameMyConfigData1 typeConsoleApplication.ConfigFiles.ConfigFile,ConsoleApplication/configSectionsMyConfigData configSourceConfigFiles\MyConfigFile.config/startup supportedRuntime versionv4.0 sku.NETFramework,Versionv4.6 /startup configuration 自定义文件 MyConfigFile.config 内容 xml version1.0 encodingutf-8 ? MyConfigDataadd keyKey一 value自定义文件一 /add keyKey二 value自定义文件二 /add keyKey三 value自定义文件三 / MyConfigData XML XML文件常用于简化数据的存储和共享它的设计宗旨是传输数据而非显示数据。对于复杂不规则的配置信息也可以用XML文件进行存储。 // 读取文件 XmlDocument xmlDoc new XmlDocument(); xmlDoc.Load(myfile.xml); // 根节点 var nodeRoot xmlDoc.DocumentElement; // 创建新节点 XmlElement studentNode xmlDoc.CreateElement(student); // 创建新节点的孩子节点 XmlElement nameNode xmlDoc.CreateElement(name); // 建立父子关系 studentNode.AppendChild(nameNode); nodeRoot.AppendChild(studentNode); XML基础教程https://www.w3school.com.cn/xml/index.asp 我的公众号
http://www.pierceye.com/news/837963/

相关文章:

  • 哈尔滨公司做网站动画设计的大学排名
  • 网站建设与网页制作试卷网站搜索引擎优化推广
  • 网站子目录设计网站开发数据库技术
  • 可以做音基题的音乐网站上海网站设计公司有哪些
  • 昆明做网站公司做家居的网站
  • 网站建设首选易网宣软文代发
  • 手机版网站开发用什么语言自己建设的网站怎么赚钱
  • 宁波建设监理协会网站软件开发文档的作用
  • 兰州电商平台网站建设网路神做网站怎么样
  • 诸城易讯网站建设服务中心网址的域名
  • 制作商务网站应用公园制作app软件下载
  • 情头定制网站被称为网站开发神器
  • 宝安网站设计案例淘宝页面制作
  • 天津品牌网站制作怎样建设网站流程
  • 怎样进行公司网站建设wordpress主题公司
  • 外宣做网站宣传网站功能描述
  • 部队网站建设多少钱营销自己的网站
  • 长春市城乡建设部网站南昌诚推网络技术有限公司
  • 网站 建设 欢迎你濮阳家电网站建设
  • 怎么快速建立一个网站如何用腾讯云服务器搭建wordpress
  • 五屏网站建设多少钱深圳网站公司有哪些
  • 莆田网站建站wordpress cd
  • 软件下载安装免费南京seo关键词优化服务
  • 广州网站设计软件建设将网站加入受信网站再试
  • 淘宝联盟网站备案常见的互联网应用
  • 自己做网站 搜索功能开发企业综合信息服务平台
  • 意大利语网站建设wordpress主题首页显示不全
  • 模板网站免费下载wordpress启用静态
  • 保定网站建设哪家好网站建设实践报告3000字
  • 网站制作项目执行免费制作微网站