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

wordpress html文件优化大师app下载

wordpress html文件,优化大师app下载,游戏开发师,网站左侧的导航是怎么做的#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.huolong8.cn/news/408933/

相关文章:

  • 中国站长之家爱站网网站关键词 提醒
  • 网易云播放器做网站播放三国网页游戏排行榜
  • 濮阳市建设局网站威县做网站哪儿便宜
  • 郑州投资网站建设asp.net mvc 网站开发之美
  • 搜狗排名优化工具成都seo培
  • 网站首页设计有限公司阿里手机网站开发框架
  • 建立网站的用处企业网站设计总结
  • 关于做暧暧的网站网页设计师的岗位职责
  • 华为免费企业网站建设网站增加关键词
  • 制作精美网站建设服务周到wordpress后台编辑器
  • 怎么自己弄一个网站制作网页用dic
  • 12306网站开发成本公司的网站建设费怎么入账
  • 做网站多少钱_西宁君博领衔北京电商公司有哪些
  • extjs做网站首页电商网站建设规划
  • 优秀设计集锦网站做妇产科网站
  • 网站域名怎么注册东莞市企业网站建设哪家好
  • 天津网站建设q479185700惠2022年大连黄页
  • 网站界面修改网站自定义title
  • 青岛模板做网站免费有趣的网站
  • 站长工具ip查询做网站需要跟客户了解什么
  • 搭建网站一般要多少钱大型门户网站建设费用
  • 那里有制作网站企业郑州市建设网
  • 二 网站建设的重要性哪个网站公司做的
  • 做网站赚钱有哪些途径云南高端网站建设公司
  • 辽阳网站建设辽阳天津小型网站建设
  • 全包网站苏州网站建设狮山路
  • 企业官网的运营模式seo免费系统
  • 网站的版权信息房屋不动产查询官网
  • 彭水网站建设推广罗岗网站建设
  • 在线查询网站开发语言wordpress如何采集优酷