﻿{"id":492,"date":"2009-11-30T15:12:00","date_gmt":"2009-11-30T07:12:00","guid":{"rendered":"http:\/\/blog.jixin.ntxz.net\/?p=492"},"modified":"2010-07-30T15:41:11","modified_gmt":"2010-07-30T07:41:11","slug":"c%e8%87%aa%e5%ae%9a%e4%b9%89%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8f%e9%85%8d%e7%bd%ae%e6%96%87%e4%bb%b6%ef%bc%88app-config%ef%bc%89","status":"publish","type":"post","link":"http:\/\/www.ntxz.net\/?p=492","title":{"rendered":"C#\u81ea\u5b9a\u4e49\u5e94\u7528\u7a0b\u5e8f\u914d\u7f6e\u6587\u4ef6\uff08app.config\uff09"},"content":{"rendered":"<table cellSpacing=0 cellPadding=0>\n<tbody>\n<tr>\n<td class=t_msgfont id=postmessage_768>1.&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;\u914d\u7f6e\u6587\u4ef6\u6982\u8ff0\uff1a <br \/>\u5e94\u7528\u7a0b\u5e8f\u914d\u7f6e\u6587\u4ef6\u662f\u6807\u51c6\u7684 XML \u6587\u4ef6\uff0cXML \u6807\u8bb0\u548c\u5c5e\u6027\u662f\u533a\u5206\u5927\u5c0f\u5199\u7684\u3002\u5b83\u662f\u53ef\u4ee5\u6309\u9700\u8981\u66f4\u6539\u7684\uff0c\u5f00\u53d1\u4eba\u5458\u53ef\u4ee5\u4f7f\u7528\u914d\u7f6e\u6587\u4ef6\u6765\u66f4\u6539\u8bbe\u7f6e\uff0c\u800c\u4e0d\u5fc5\u91cd\u7f16\u8bd1\u5e94\u7528\u7a0b\u5e8f\u3002\u914d\u7f6e\u6587\u4ef6\u7684\u6839\u8282\u70b9\u662fconfiguration\u3002\u6211\u4eec\u7ecf\u5e38<span class=t_tag onclick=tagshow(event) href=\"http:\/\/blog.cnbytes.net\/tag.php?name=%B7%C3%CE%CA\">\u8bbf\u95ee<\/span>\u7684\u662fappSettings\uff0c\u5b83\u662f\u7531.Net\u9884<span class=t_tag onclick=tagshow(event) href=\"http:\/\/blog.cnbytes.net\/tag.php?name=%B6%A8%D2%E5\">\u5b9a\u4e49<\/span>\u914d\u7f6e\u8282\u3002\u6211\u4eec\u7ecf\u5e38\u4f7f\u7528\u7684\u914d\u7f6e\u6587\u4ef6\u7684\u67b6\u6784\u662f\u8c61\u4e0b\u9762\u7684\u5f62\u5f0f\u3002\u5148\u5927\u6982\u6709\u4e2a\u5370\u8c61\uff0c\u901a\u8fc7\u540e\u9762\u7684\u5b9e\u4f8b\u4f1a\u6709\u4e00\u4e2a\u6bd4\u8f83\u6e05\u695a\u7684\u8ba4\u8bc6\u3002\u4e0b\u9762\u7684\u201c\u914d\u7f6e\u8282\u201d\u53ef\u4ee5\u7406\u89e3\u4e3a\u8fdb\u884c\u914d\u7f6e\u4e00\u4e2aXML\u7684\u8282\u70b9\u3002<\/p>\n<p>\u5e38\u89c1\u914d\u7f6e\u6587\u4ef6\u6a21\u5f0f\uff1a<\/p>\n<p>&lt;configuration&gt;<br \/>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&lt;configSections&gt;&nbsp; &nbsp; \/\/\u914d\u7f6e\u8282\u58f0\u660e\u533a\u57df\uff0c\u5305\u542b\u914d\u7f6e\u8282\u548c\u547d\u540d\u7a7a\u95f4\u58f0\u660e<br \/>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; &lt;section&gt;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;\/\/\u914d\u7f6e\u8282\u58f0\u660e<br \/>&nbsp; &nbsp;&nbsp;&nbsp;\u3000&nbsp; &nbsp;&nbsp; &nbsp; &lt;sectionGroup&gt;&nbsp; &nbsp;&nbsp; &nbsp; \/\/\u5b9a\u4e49\u914d\u7f6e\u8282\u7ec4<br \/>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;\u3000\u3000&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&lt;section&gt;&nbsp; &nbsp;&nbsp; &nbsp; \/\/\u914d\u7f6e\u8282\u7ec4\u4e2d\u7684\u914d\u7f6e\u8282\u58f0\u660e<br \/>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&lt;appSettings&gt; \/\/\u9884\u5b9a\u4e49\u914d\u7f6e\u8282<br \/>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&lt;Custom element for configuration section&gt;&nbsp;&nbsp;\/\/\u914d\u7f6e\u8282\u8bbe\u7f6e\u533a\u57df<\/p>\n<p>2.&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;\u53ea\u6709appSettings\u8282\u7684\u914d\u7f6e\u6587\u4ef6\u53ca\u8bbf\u95ee\u65b9\u6cd5 <\/p>\n<p>\u4e0b\u9762\u662f\u4e00\u4e2a\u6700\u5e38\u89c1\u7684\u5e94\u7528\u7a0b\u5e8f\u914d\u7f6e\u6587\u4ef6\u7684\u4f8b\u5b50\uff0c\u53ea\u6709appSettings\u8282\u3002<\/p>\n<p>&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;utf-8&#8243;?&gt;<br \/>&lt;configuration&gt;<br \/>&nbsp; &nbsp; &lt;appSettings&gt;<br \/>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&lt;add key=&#8221;connectionstring&#8221; value=&#8221;User ID=sa;Data Source=.;Password=;Initial Catalog=test;Provider=<span class=t_tag onclick=tagshow(event) href=\"http:\/\/blog.cnbytes.net\/tag.php?name=SQL\">SQL<\/span>OLEDB.1;&#8221; \/&gt;<br \/>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&lt;add key=&#8221;TemplatePATH&#8221; value=&#8221;Template&#8221; \/&gt;<br \/>&nbsp; &nbsp; &lt;\/appSettings&gt;<br \/>&lt;\/configuration&gt;<\/p>\n<p>\u4e0b\u9762\u6765\u770b\u770b\u8fd9\u6837\u7684\u914d\u7f6e\u6587\u4ef6\u5982\u4f55\u65b9\u6cd5\u3002<\/p>\n<p>string _connectionString=ConfigurationSettings.AppSettings[&#8220;connectionstring&#8221;];<\/p>\n<p>\u4f7f\u7528ConfigurationSettings\u7c7b\u7684\u9759\u6001\u5c5e\u6027AppSettings\u5c31\u53ef\u4ee5\u76f4\u63a5\u65b9\u6cd5\u914d\u7f6e\u6587\u4ef6\u4e2d\u7684\u914d\u7f6e\u4fe1\u606f\u3002\u8fd9\u4e2a\u5c5e\u6027\u7684\u7c7b\u578b\u662fNameValueCollection\u3002<\/p>\n<p>3.&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;\u81ea\u5b9a\u4e49\u914d\u7f6e\u6587\u4ef6 <br \/>3.1\u3000\u81ea\u5b9a\u4e49\u914d\u7f6e\u8282<\/p>\n<p>\u4e00\u4e2a\u7528\u6237\u81ea\u5b9a\u4e49\u7684\u914d\u7f6e\u8282\uff0c\u5728\u914d\u7f6e\u6587\u4ef6\u4e2d\u5206\u4e3a\u4e24\u90e8\u5206\uff1a\u4e00\u662f\u5728&lt;configSections&gt;&lt;\/ configSections&gt;\u914d\u7f6e\u8282\u4e2d\u58f0\u660e\u914d\u7f6e\u8282\uff08\u4e0a\u9762\u914d\u7f6e\u6587\u4ef6\u6a21\u5f0f\u4e2d\u7684\u201c&lt;section&gt;\u201d\uff09\uff0c\u53e6\u5916\u662f\u5728&lt;configSections&gt;&lt;\/ configSections &gt;\u4e4b\u540e\u8bbe\u7f6e\u914d\u7f6e\u8282\uff08\u4e0a\u9762\u914d\u7f6e\u6587\u4ef6\u6a21\u5f0f\u4e2d\u7684\u201c&lt;Custom element for configuration section&gt;\u201d\uff09\uff0c\u6709\u70b9\u7c7b\u4f3c\u4e00\u4e2a\u53d8\u91cf\u5148\u58f0\u660e\uff0c\u540e\u4f7f\u7528\u4e00\u6837\u3002\u58f0\u660e\u4e00\u4e2a\u914d\u7f6e\u6587\u4ef6\u7684\u8bed\u53e5\u5982\u4e0b\uff1a<\/p>\n<p>&lt;section name=&#8221; &#8221; type=&#8221; &#8220;\/&gt; <br \/>&lt;section&gt;\uff1a\u58f0\u660e\u65b0\u914d\u7f6e\u8282\uff0c\u5373\u53ef\u521b\u5efa\u65b0\u914d\u7f6e\u8282\u3002<\/p>\n<p>name\uff1a\u81ea\u5b9a\u4e49\u914d\u7f6e\u8282\u7684\u540d\u79f0\u3002<\/p>\n<p>type\uff1a\u81ea\u5b9a\u4e49\u914d\u7f6e\u8282\u7684\u7c7b\u578b\uff0c\u4e3b\u8981\u5305\u62ecSystem.Configuration.SingleTagSectionHandler\u3001System.Configuration.DictionarySectionHandler\u3001System.Configuration.NameValueSectionHandler\u3002<\/p>\n<p>\u4e0d\u540c\u7684type\u4e0d\u4f46\u8bbe\u7f6e\u914d\u7f6e\u8282\u7684\u65b9\u5f0f\u4e0d\u4e00\u6837\uff0c\u6700\u540e\u8bbf\u95ee\u914d\u7f6e\u6587\u4ef6\u7684***\u4f5c\u4e0a\u4e5f\u6709\u5dee\u5f02\u3002\u4e0b\u9762\u6211\u4eec\u5c31\u4e3e\u4e00\u4e2a\u914d\u7f6e\u6587\u4ef6\u7684\u4f8b\u5b50\uff0c\u8ba9\u5b83\u5305\u542b\u8fd9\u4e09\u4e2a\u4e0d\u540c\u7684type\u3002<\/p>\n<p>&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;utf-8&#8243; ?&gt;<br \/>&lt;configuration&gt;<br \/>&nbsp; &nbsp; &lt;configSections&gt;<br \/>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&lt;section name=&#8221;Test1&#8243; type=&#8221;System.Configuration.SingleTagSectionHandler&#8221;\/&gt;<br \/>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&lt;section name=&#8221;Test2&#8243; type=&#8221;System.Configuration.DictionarySectionHandler&#8221;\/&gt;<br \/>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&lt;section name=&#8221;Test3&#8243; type=&#8221;System.Configuration.NameValueSectionHandler&#8221; \/&gt;<br \/>&nbsp; &nbsp; &lt;\/configSections&gt;<br \/>&nbsp; &nbsp; <br \/>&nbsp; &nbsp; &lt;Test1 setting1=&#8221;Hello&#8221; setting2=&#8221;World&#8221;\/&gt;<br \/>&nbsp; &nbsp; &lt;Test2&gt;<br \/>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&lt;add key=&#8221;Hello&#8221; value=&#8221;World&#8221; \/&gt;<br \/>&nbsp; &nbsp; &lt;\/Test2&gt;<br \/>&nbsp; &nbsp; &lt;Test3&gt;<br \/>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&lt;add key=&#8221;Hello&#8221; value=&#8221;World&#8221; \/&gt;<br \/>&nbsp; &nbsp; &lt;\/Test3&gt;&nbsp; &nbsp; <br \/>&lt;\/configuration&gt;<\/p>\n<p>\u6211\u4eec\u5bf9\u4e0a\u9762\u7684\u81ea\u5b9a\u4e49\u914d\u7f6e\u8282\u8fdb\u884c\u8bf4\u660e\u3002\u5728\u58f0\u660e\u90e8\u5206\u4f7f\u7528&lt;section name=&#8221;Test1&#8243; type=&#8221;System.Configuration.SingleTagSectionHandler&#8221;\/&gt;\u58f0\u660e\u4e86\u4e00\u4e2a\u914d\u7f6e\u8282\u5b83\u7684\u540d\u5b57\u53ebTest1\uff0c\u7c7b\u578b\u4e3aSingleTagSectionHandler\u3002\u5728\u8bbe\u7f6e\u914d\u7f6e\u8282\u90e8\u5206\u4f7f\u7528&nbsp; &nbsp;&nbsp;&nbsp;&lt;Test1 setting1=&#8221;Hello&#8221; setting2=&#8221;World&#8221;\/&gt;\u8bbe\u7f6e\u4e86\u4e00\u4e2a\u914d\u7f6e\u8282\uff0c\u5b83\u7684\u7b2c\u4e00\u4e2a\u8bbe\u7f6e\u7684\u503c\u662fHello\uff0c\u7b2c\u4e8c\u4e2a\u503c\u662fWorld\uff0c\u5f53\u7136\u8fd8\u53ef\u4ee5\u6709\u66f4\u591a\u3002\u5176\u5b83\u7684\u4e24\u4e2a\u914d\u7f6e\u8282\u548c\u8fd9\u4e2a\u7c7b\u4f3c\u3002 <br \/>\u4e0b\u9762\u6211\u4eec\u770b\u5728\u7a0b\u5e8f\u4e2d\u5982\u4f55\u8bbf\u95ee\u8fd9\u4e9b\u81ea\u5b9a\u4e49\u7684\u914d\u7f6e\u8282\u3002\u6211\u4eec\u7528\u8fc7ConfigurationSettings\u7c7b\u7684\u9759\u6001\u65b9\u6cd5GetConfig\u6765\u83b7\u53d6\u81ea\u5b9a\u4e49\u914d\u7f6e\u8282\u7684\u4fe1\u606f\u3002<\/p>\n<p>public static object GetConfig(string sectionName);<\/p>\n<p>\u4e0b\u9762\u662f\u8bbf\u95ee\u8fd9\u4e09\u4e2a\u914d\u7f6e\u8282\u7684\u4ee3\u7801\uff1a<\/p>\n<p>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;\/\/\u8bbf\u95ee\u914d\u7f6e\u8282Test1<br \/>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;IDictionary IDTest1 = (IDictionary)ConfigurationSettings.GetConfig(&#8220;Test1&#8221;);<br \/>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;string str = (string)IDTest1[&#8220;setting1&#8243;] +&#8221; &#8220;+(string)IDTest1[&#8220;setting2&#8221;];<br \/>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;MessageBox.Show(str);&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;\/\/\u8f93\u51faHello World<\/p>\n<p>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;\/\/\u8bbf\u95ee\u914d\u7f6e\u8282Test1\u7684\u65b9\u6cd52<br \/>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;string[] values1=new string[IDTest1.Count];<br \/>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;IDTest1.Values.CopyTo(values1,0);<br \/>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;MessageBox.Show(values1[0]+&#8221; &#8220;+values1[1]);&nbsp; &nbsp; \/\/\u8f93\u51faHello World<br \/>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<br \/>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;\/\/\u8bbf\u95ee\u914d\u7f6e\u8282Test2<br \/>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;IDictionary IDTest2 = (IDictionary)ConfigurationSettings.GetConfig(&#8220;Test2&#8221;);<br \/>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;string[] keys=new string[IDTest2.Keys.Count];<br \/>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;string[] values=new string[IDTest2.Keys.Count];<br \/>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;IDTest2.Keys.CopyTo(keys,0);<br \/>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;IDTest2.Values.CopyTo(values,0);<br \/>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;MessageBox.Show(keys[0]+&#8221; &#8220;+values[0]);<br \/>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<br \/>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;\/\/\u8bbf\u95ee\u914d\u7f6e\u8282Test3<br \/>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;NameValueCollection nc=(NameValueCollection)ConfigurationSettings.GetConfig(&#8220;Test3&#8221;);<br \/>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;MessageBox.Show(nc.AllKeys[0].ToString()+&#8221; &#8220;+nc[&#8220;Hello&#8221;]);&nbsp; &nbsp; \/\/\u8f93\u51faHello World<\/p>\n<p>\u901a\u8fc7\u4e0a\u9762\u7684\u4ee3\u7801\u6211\u4eec\u53ef\u4ee5\u770b\u51fa\uff0c\u4e0d\u540c\u7684type\u901a\u8fc7GetConfig\u8fd4\u56de\u7684\u7c7b\u578b\u4e0d\u540c\uff0c\u5177\u4f53\u83b7\u5f97\u914d\u7f6e\u5185\u5bb9\u7684\u65b9\u5f0f\u4e5f\u4e0d\u4e00\u6837\u3002 \u914d\u7f6e\u8282\u5904\u7406\u7a0b\u5e8f<br \/>\u8fd4\u56de\u7c7b\u578b<\/p>\n<p>SingleTagSectionHandler<br \/>Systems.Collections.IDictionary<\/p>\n<p>DictionarySectionHandler<br \/>Systems.Collections.IDictionary<\/p>\n<p>NameValueSectionHandler<br \/>Systems.Collections.Specialized.NameValueCollection<\/p>\n<p>&nbsp;&nbsp;3.2\u3000\u81ea\u5b9a\u4e49\u914d\u7f6e\u8282\u7ec4 <br \/>\u914d\u7f6e\u8282\u7ec4\u662f\u4f7f\u7528&lt;sectionGroup&gt;\u5143\u7d20\uff0c\u5c06\u7c7b\u4f3c\u7684\u914d\u7f6e\u8282\u5206\u5230\u540c\u4e00\u4e2a\u7ec4\u4e2d\u3002\u914d\u7f6e\u8282\u7ec4\u58f0\u660e\u90e8\u5206\u5c06\u521b\u5efa\u914d\u7f6e\u8282\u7684\u5305\u542b\u5143\u7d20\uff0c\u5728&lt;configSections&gt;\u5143\u7d20\u4e2d\u58f0\u660e\u914d\u7f6e\u8282\u7ec4\uff0c\u5e76\u5c06\u5c5e\u4e8e\u8be5\u7ec4\u7684\u8282\u7f6e\u4e8e&lt;sectionGroup&gt;\u5143\u7d20\u4e2d\u3002\u4e0b\u9762\u662f\u4e00\u4e2a\u5305\u542b\u914d\u7f6e\u8282\u7ec4\u7684\u914d\u7f6e\u6587\u4ef6\u7684\u4f8b\u5b50\uff1a<\/p>\n<p>&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;utf-8&#8243; ?&gt;<br \/>&lt;configuration&gt;<br \/>&nbsp; &nbsp; &lt;configSections&gt;<br \/>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&lt;sectionGroup name=&#8221;TestGroup&#8221;&gt;<br \/>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&lt;section name=&#8221;Test&#8221; type=&#8221;System.Configuration.NameValueSectionHandler&#8221;\/&gt;<br \/>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&lt;\/sectionGroup&gt;<br \/>&nbsp; &nbsp; &lt;\/configSections&gt;<br \/>&nbsp; &nbsp; <br \/>&nbsp; &nbsp; &lt;TestGroup&gt;<br \/>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&lt;Test&gt;<br \/>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&lt;add key=&#8221;Hello&#8221; value=&#8221;World&#8221;\/&gt;<br \/>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&lt;\/Test&gt;<br \/>&nbsp; &nbsp; &lt;\/TestGroup&gt;<br \/>&lt;\/configuration&gt;<br \/>\u4e0b\u9762\u662f\u8bbf\u95ee\u8fd9\u4e2a\u914d\u7f6e\u8282\u7ec4\u7684\u4ee3\u7801\uff1a<br \/>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;NameValueCollection nc=(NameValueCollection)ConfigurationSettings.GetConfig(&#8220;TestGroup\/Test&#8221;);<br \/>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;MessageBox.Show(nc.AllKeys[0].ToString()+&#8221; &#8220;+nc[&#8220;Hello&#8221;]);&nbsp; &nbsp; \/\/\u8f93\u51faHello World<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>1.&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;\u914d\u7f6e\u6587\u4ef6\u6982\u8ff0\uff1a \u5e94\u7528\u7a0b\u5e8f\u914d\u7f6e\u6587 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,8],"tags":[],"class_list":["post-492","post","type-post","status-publish","format-standard","hentry","category-1","category-oldblog"],"views":758,"_links":{"self":[{"href":"http:\/\/www.ntxz.net\/index.php?rest_route=\/wp\/v2\/posts\/492","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.ntxz.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.ntxz.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.ntxz.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.ntxz.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=492"}],"version-history":[{"count":1,"href":"http:\/\/www.ntxz.net\/index.php?rest_route=\/wp\/v2\/posts\/492\/revisions"}],"predecessor-version":[{"id":828,"href":"http:\/\/www.ntxz.net\/index.php?rest_route=\/wp\/v2\/posts\/492\/revisions\/828"}],"wp:attachment":[{"href":"http:\/\/www.ntxz.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=492"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.ntxz.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=492"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.ntxz.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=492"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}