{"id":1119442,"date":"2025-01-08T18:44:46","date_gmt":"2025-01-08T10:44:46","guid":{"rendered":""},"modified":"2025-01-08T18:44:49","modified_gmt":"2025-01-08T10:44:49","slug":"%e5%a6%82%e4%bd%95%e7%94%a8python%e6%89%93%e5%bc%80%e4%b8%80%e4%b8%aa%e6%96%87%e4%bb%b6","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1119442.html","title":{"rendered":"\u5982\u4f55\u7528python\u6253\u5f00\u4e00\u4e2a\u6587\u4ef6"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25082533\/b01531c7-0f0e-4853-9d83-2a7f2fb68a42.webp\" alt=\"\u5982\u4f55\u7528python\u6253\u5f00\u4e00\u4e2a\u6587\u4ef6\" \/><\/p>\n<p><p> <strong>\u7528Python\u6253\u5f00\u4e00\u4e2a\u6587\u4ef6\u7684\u65b9\u6cd5\u4e3b\u8981\u6709\uff1a\u4f7f\u7528\u5185\u7f6e\u7684<code>open()<\/code>\u51fd\u6570\u3001\u4f7f\u7528\u4e0a\u4e0b\u6587\u7ba1\u7406\u5668<code>with<\/code>\u8bed\u53e5\u3001\u6307\u5b9a\u6587\u4ef6\u6a21\u5f0f\u7b49\u3002<\/strong> \u5176\u4e2d<strong>\u4f7f\u7528\u4e0a\u4e0b\u6587\u7ba1\u7406\u5668<code>with<\/code>\u8bed\u53e5<\/strong>\u662f\u6700\u63a8\u8350\u7684\u65b9\u5f0f\uff0c\u56e0\u4e3a\u5b83\u53ef\u4ee5\u81ea\u52a8\u5904\u7406\u6587\u4ef6\u5173\u95ed\u64cd\u4f5c\uff0c\u9632\u6b62\u6587\u4ef6\u6cc4\u9732\u3002\u4e0b\u9762\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u8fd9\u4e9b\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u4f7f\u7528<code>open()<\/code>\u51fd\u6570<\/p>\n<\/p>\n<p><p>Python\u63d0\u4f9b\u4e86\u4e00\u4e2a\u5185\u7f6e\u7684<code>open()<\/code>\u51fd\u6570\u6765\u5904\u7406\u6587\u4ef6\u64cd\u4f5c\u3002\u8fd9\u4e2a\u51fd\u6570\u53ef\u4ee5\u7528\u6765\u6253\u5f00\u4e00\u4e2a\u6587\u4ef6\uff0c\u5e76\u8fd4\u56de\u4e00\u4e2a\u6587\u4ef6\u5bf9\u8c61\u3002\u6587\u4ef6\u5bf9\u8c61\u5305\u542b\u4e86\u6587\u4ef6\u7684\u5185\u5bb9\uff0c\u5e76\u63d0\u4f9b\u4e86\u4e00\u4e9b\u65b9\u6cd5\u6765\u8fdb\u884c\u6587\u4ef6\u64cd\u4f5c\uff0c\u5982\u8bfb\u53d6\u3001\u5199\u5165\u548c\u5173\u95ed\u6587\u4ef6\u3002<\/p>\n<\/p>\n<p><h3>1. \u57fa\u672c\u4f7f\u7528\u65b9\u6cd5<\/h3>\n<\/p>\n<p><pre><code class=\"language-python\">file = open(&#39;example.txt&#39;, &#39;r&#39;)<\/p>\n<h2><strong>\u8fdb\u884c\u6587\u4ef6\u64cd\u4f5c<\/strong><\/h2>\n<p>file.close()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u9762\u7684\u4ee3\u7801\u4e2d\uff0c<code>open()<\/code>\u51fd\u6570\u63a5\u53d7\u4e24\u4e2a\u53c2\u6570\uff1a\u6587\u4ef6\u540d\uff08&#39;example.txt&#39;\uff09\u548c\u6a21\u5f0f\uff08&#39;r&#39;\u8868\u793a\u8bfb\u53d6\u6a21\u5f0f\uff09\u3002\u6253\u5f00\u6587\u4ef6\u540e\uff0c\u6211\u4eec\u9700\u8981\u8c03\u7528<code>close()<\/code>\u65b9\u6cd5\u6765\u5173\u95ed\u6587\u4ef6\uff0c\u91ca\u653e\u7cfb\u7edf\u8d44\u6e90\u3002<\/p>\n<\/p>\n<p><h3>2. \u6587\u4ef6\u6a21\u5f0f<\/h3>\n<\/p>\n<p><p>\u6587\u4ef6\u6a21\u5f0f\u7528\u4e8e\u6307\u5b9a\u6253\u5f00\u6587\u4ef6\u7684\u6a21\u5f0f\uff0c\u5e38\u7528\u7684\u6a21\u5f0f\u6709\uff1a<\/p>\n<\/p>\n<ul>\n<li><code>&#39;r&#39;<\/code>\uff1a\u53ea\u8bfb\u6a21\u5f0f\uff08\u9ed8\u8ba4\u503c\uff09\u3002<\/li>\n<li><code>&#39;w&#39;<\/code>\uff1a\u5199\u5165\u6a21\u5f0f\uff08\u4f1a\u8986\u76d6\u539f\u6587\u4ef6\u5185\u5bb9\uff09\u3002<\/li>\n<li><code>&#39;a&#39;<\/code>\uff1a\u8ffd\u52a0\u6a21\u5f0f\uff08\u5728\u6587\u4ef6\u672b\u5c3e\u8ffd\u52a0\u5185\u5bb9\uff09\u3002<\/li>\n<li><code>&#39;b&#39;<\/code>\uff1a\u4e8c\u8fdb\u5236\u6a21\u5f0f\uff08\u7528\u4e8e\u5904\u7406\u975e\u6587\u672c\u6587\u4ef6\uff0c\u5982\u56fe\u7247\u3001\u89c6\u9891\uff09\u3002<\/li>\n<li><code>&#39;+&#39;<\/code>\uff1a\u8bfb\u5199\u6a21\u5f0f\u3002<\/li>\n<\/ul>\n<p><p>\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u4ee5\u5199\u5165\u6a21\u5f0f\u6253\u5f00\u6587\u4ef6<\/p>\n<p>file = open(&#39;example.txt&#39;, &#39;w&#39;)<\/p>\n<p>file.write(&#39;Hello, World!&#39;)<\/p>\n<p>file.close()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e8c\u3001\u4f7f\u7528<code>with<\/code>\u8bed\u53e5<\/p>\n<\/p>\n<p><p>\u4f7f\u7528<code>with<\/code>\u8bed\u53e5\u53ef\u4ee5\u7b80\u5316\u6587\u4ef6\u64cd\u4f5c\uff0c\u5e76\u786e\u4fdd\u6587\u4ef6\u5728\u64cd\u4f5c\u5b8c\u6210\u540e\u81ea\u52a8\u5173\u95ed\u3002<code>with<\/code>\u8bed\u53e5\u4f1a\u81ea\u52a8\u8c03\u7528\u6587\u4ef6\u5bf9\u8c61\u7684<code>__enter__<\/code>\u548c<code>__exit__<\/code>\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><h3>1. \u57fa\u672c\u4f7f\u7528\u65b9\u6cd5<\/h3>\n<\/p>\n<p><pre><code class=\"language-python\">with open(&#39;example.txt&#39;, &#39;r&#39;) as file:<\/p>\n<p>    content = file.read()<\/p>\n<p>    print(content)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u9762\u7684\u4ee3\u7801\u4e2d\uff0c<code>with<\/code>\u8bed\u53e5\u4f1a\u5728\u5757\u5185\u81ea\u52a8\u8c03\u7528<code>file.close()<\/code>\uff0c\u5373\u4f7f\u53d1\u751f\u5f02\u5e38\u4e5f\u4f1a\u5173\u95ed\u6587\u4ef6\u3002<\/p>\n<\/p>\n<p><h3>2. \u591a\u6587\u4ef6\u64cd\u4f5c<\/h3>\n<\/p>\n<p><p>\u6211\u4eec\u8fd8\u53ef\u4ee5\u5728\u4e00\u4e2a<code>with<\/code>\u8bed\u53e5\u4e2d\u540c\u65f6\u64cd\u4f5c\u591a\u4e2a\u6587\u4ef6\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">with open(&#39;input.txt&#39;, &#39;r&#39;) as infile, open(&#39;output.txt&#39;, &#39;w&#39;) as outfile:<\/p>\n<p>    content = infile.read()<\/p>\n<p>    outfile.write(content)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e09\u3001\u8bfb\u53d6\u6587\u4ef6\u5185\u5bb9<\/p>\n<\/p>\n<p><p>Python\u63d0\u4f9b\u4e86\u591a\u79cd\u65b9\u6cd5\u6765\u8bfb\u53d6\u6587\u4ef6\u5185\u5bb9\uff0c\u5305\u62ec<code>read()<\/code>, <code>readline()<\/code>, \u548c <code>readlines()<\/code>\u3002<\/p>\n<\/p>\n<p><h3>1. <code>read()<\/code>\u65b9\u6cd5<\/h3>\n<\/p>\n<p><p><code>read()<\/code>\u65b9\u6cd5\u4f1a\u8bfb\u53d6\u6574\u4e2a\u6587\u4ef6\u5185\u5bb9\uff0c\u5e76\u5c06\u5176\u4f5c\u4e3a\u4e00\u4e2a\u5b57\u7b26\u4e32\u8fd4\u56de\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">with open(&#39;example.txt&#39;, &#39;r&#39;) as file:<\/p>\n<p>    content = file.read()<\/p>\n<p>    print(content)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>2. <code>readline()<\/code>\u65b9\u6cd5<\/h3>\n<\/p>\n<p><p><code>readline()<\/code>\u65b9\u6cd5\u4f1a\u9010\u884c\u8bfb\u53d6\u6587\u4ef6\u5185\u5bb9\uff0c\u6bcf\u6b21\u8c03\u7528\u8fd4\u56de\u4e00\u884c\u5b57\u7b26\u4e32\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">with open(&#39;example.txt&#39;, &#39;r&#39;) as file:<\/p>\n<p>    line = file.readline()<\/p>\n<p>    while line:<\/p>\n<p>        print(line, end=&#39;&#39;)<\/p>\n<p>        line = file.readline()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>3. <code>readlines()<\/code>\u65b9\u6cd5<\/h3>\n<\/p>\n<p><p><code>readlines()<\/code>\u65b9\u6cd5\u4f1a\u8bfb\u53d6\u6240\u6709\u884c\uff0c\u5e76\u5c06\u5176\u4f5c\u4e3a\u4e00\u4e2a\u5217\u8868\u8fd4\u56de\uff0c\u6bcf\u4e2a\u5143\u7d20\u90fd\u662f\u4e00\u884c\u5b57\u7b26\u4e32\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">with open(&#39;example.txt&#39;, &#39;r&#39;) as file:<\/p>\n<p>    lines = file.readlines()<\/p>\n<p>    for line in lines:<\/p>\n<p>        print(line, end=&#39;&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u56db\u3001\u5199\u5165\u6587\u4ef6\u5185\u5bb9<\/p>\n<\/p>\n<p><p>Python\u63d0\u4f9b\u4e86<code>write()<\/code>\u548c<code>writelines()<\/code>\u65b9\u6cd5\u6765\u5199\u5165\u6587\u4ef6\u5185\u5bb9\u3002<\/p>\n<\/p>\n<p><h3>1. <code>write()<\/code>\u65b9\u6cd5<\/h3>\n<\/p>\n<p><p><code>write()<\/code>\u65b9\u6cd5\u4f1a\u5c06\u4e00\u4e2a\u5b57\u7b26\u4e32\u5199\u5165\u6587\u4ef6\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">with open(&#39;example.txt&#39;, &#39;w&#39;) as file:<\/p>\n<p>    file.write(&#39;Hello, World!\\n&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>2. <code>writelines()<\/code>\u65b9\u6cd5<\/h3>\n<\/p>\n<p><p><code>writelines()<\/code>\u65b9\u6cd5\u4f1a\u5c06\u4e00\u4e2a\u5b57\u7b26\u4e32\u5217\u8868\u5199\u5165\u6587\u4ef6\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">lines = [&#39;Hello, World!\\n&#39;, &#39;Python is great!\\n&#39;]<\/p>\n<p>with open(&#39;example.txt&#39;, &#39;w&#39;) as file:<\/p>\n<p>    file.writelines(lines)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e94\u3001\u6587\u4ef6\u64cd\u4f5c\u7684\u9ad8\u7ea7\u7528\u6cd5<\/p>\n<\/p>\n<p><h3>1. \u6587\u4ef6\u6307\u9488<\/h3>\n<\/p>\n<p><p>\u6587\u4ef6\u5bf9\u8c61\u6709\u4e00\u4e2a\u6587\u4ef6\u6307\u9488\uff0c\u5b83\u6307\u793a\u5f53\u524d\u8bfb\u53d6\u6216\u5199\u5165\u7684\u4f4d\u7f6e\u3002\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528<code>tell()<\/code>\u65b9\u6cd5\u83b7\u53d6\u6587\u4ef6\u6307\u9488\u7684\u4f4d\u7f6e\uff0c\u4f7f\u7528<code>seek()<\/code>\u65b9\u6cd5\u79fb\u52a8\u6587\u4ef6\u6307\u9488\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">with open(&#39;example.txt&#39;, &#39;r&#39;) as file:<\/p>\n<p>    print(file.tell())  # \u8f93\u51fa\u5f53\u524d\u6587\u4ef6\u6307\u9488\u4f4d\u7f6e<\/p>\n<p>    file.seek(5)  # \u79fb\u52a8\u6587\u4ef6\u6307\u9488\u5230\u4f4d\u7f6e5<\/p>\n<p>    print(file.read())<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>2. \u5904\u7406\u4e8c\u8fdb\u5236\u6587\u4ef6<\/h3>\n<\/p>\n<p><p>\u5904\u7406\u4e8c\u8fdb\u5236\u6587\u4ef6\u65f6\uff0c\u9700\u8981\u5728\u6a21\u5f0f\u4e2d\u6dfb\u52a0<code>&#39;b&#39;<\/code>\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">with open(&#39;example.bin&#39;, &#39;wb&#39;) as file:<\/p>\n<p>    file.write(b&#39;\\x00\\x01\\x02\\x03&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>3. \u5f02\u5e38\u5904\u7406<\/h3>\n<\/p>\n<p><p>\u4e3a\u4e86\u5904\u7406\u6587\u4ef6\u64cd\u4f5c\u4e2d\u7684\u5f02\u5e38\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528<code>try...except<\/code>\u8bed\u53e5\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">try:<\/p>\n<p>    with open(&#39;example.txt&#39;, &#39;r&#39;) as file:<\/p>\n<p>        content = file.read()<\/p>\n<p>        print(content)<\/p>\n<p>except FileNotFoundError:<\/p>\n<p>    print(&#39;\u6587\u4ef6\u672a\u627e\u5230&#39;)<\/p>\n<p>except IOError:<\/p>\n<p>    print(&#39;\u6587\u4ef6\u8bfb\u53d6\u9519\u8bef&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u516d\u3001\u7ed3\u8bba<\/p>\n<\/p>\n<p><p>\u901a\u8fc7\u4e0a\u8ff0\u65b9\u6cd5\uff0c\u6211\u4eec\u53ef\u4ee5\u5728Python\u4e2d\u8f7b\u677e\u5730\u6253\u5f00\u548c\u64cd\u4f5c\u6587\u4ef6\u3002\u4f7f\u7528<code>with<\/code>\u8bed\u53e5\u662f\u6700\u63a8\u8350\u7684\u65b9\u5f0f\uff0c\u56e0\u4e3a\u5b83\u53ef\u4ee5\u81ea\u52a8\u5904\u7406\u6587\u4ef6\u5173\u95ed\u64cd\u4f5c\uff0c\u9632\u6b62\u6587\u4ef6\u6cc4\u9732\u3002\u6b64\u5916\uff0c\u4e86\u89e3\u4e0d\u540c\u7684\u6587\u4ef6\u6a21\u5f0f\u548c\u8bfb\u53d6\u5199\u5165\u65b9\u6cd5\uff0c\u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec\u66f4\u9ad8\u6548\u5730\u5904\u7406\u6587\u4ef6\u64cd\u4f5c\u3002\u5e0c\u671b\u8fd9\u7bc7\u6587\u7ae0\u5bf9\u4f60\u6709\u6240\u5e2e\u52a9\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u6253\u5f00\u6587\u4ef6\u5e76\u8bfb\u53d6\u5185\u5bb9\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u5185\u7f6e\u7684<code>open()<\/code>\u51fd\u6570\u6765\u6253\u5f00\u6587\u4ef6\u3002\u6253\u5f00\u6587\u4ef6\u540e\uff0c\u53ef\u4ee5\u4f7f\u7528<code>read()<\/code>\u3001<code>readline()<\/code>\u6216<code>readlines()<\/code>\u7b49\u65b9\u6cd5\u6765\u8bfb\u53d6\u6587\u4ef6\u5185\u5bb9\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u793a\u4f8b\uff1a  <\/p>\n<pre><code class=\"language-python\">with open(&#39;filename.txt&#39;, &#39;r&#39;) as file:\n    content = file.read()\n    print(content)\n<\/code><\/pre>\n<p>\u4f7f\u7528<code>with<\/code>\u8bed\u53e5\u53ef\u4ee5\u786e\u4fdd\u6587\u4ef6\u5728\u64cd\u4f5c\u5b8c\u6210\u540e\u88ab\u81ea\u52a8\u5173\u95ed\u3002<\/p>\n<p><strong>\u5728\u4f7f\u7528Python\u6253\u5f00\u6587\u4ef6\u65f6\uff0c\u5e94\u8be5\u6ce8\u610f\u54ea\u4e9b\u5e38\u89c1\u9519\u8bef\uff1f<\/strong><br \/>\u5728\u6253\u5f00\u6587\u4ef6\u65f6\uff0c\u5e38\u89c1\u7684\u9519\u8bef\u5305\u62ec\u6587\u4ef6\u4e0d\u5b58\u5728\u3001\u6743\u9650\u4e0d\u8db3\u6216\u8def\u5f84\u9519\u8bef\u3002\u4e3a\u4e86\u907f\u514d\u8fd9\u4e9b\u95ee\u9898\uff0c\u53ef\u4ee5\u4f7f\u7528\u5f02\u5e38\u5904\u7406\u673a\u5236\u3002\u4f8b\u5982\uff1a  <\/p>\n<pre><code class=\"language-python\">try:\n    with open(&#39;filename.txt&#39;, &#39;r&#39;) as file:\n        content = file.read()\nexcept FileNotFoundError:\n    print(&quot;\u6587\u4ef6\u672a\u627e\u5230\uff0c\u8bf7\u68c0\u67e5\u6587\u4ef6\u8def\u5f84\u3002&quot;)\nexcept PermissionError:\n    print(&quot;\u6ca1\u6709\u6743\u9650\u8bbf\u95ee\u8be5\u6587\u4ef6\u3002&quot;)\n<\/code><\/pre>\n<p>\u901a\u8fc7\u8fd9\u79cd\u65b9\u5f0f\uff0c\u53ef\u4ee5\u66f4\u597d\u5730\u5904\u7406\u53ef\u80fd\u51fa\u73b0\u7684\u9519\u8bef\u3002<\/p>\n<p><strong>\u5982\u4f55\u4f7f\u7528Python\u4ee5\u4e0d\u540c\u6a21\u5f0f\u6253\u5f00\u6587\u4ef6\uff1f<\/strong><br \/>Python\u7684<code>open()<\/code>\u51fd\u6570\u652f\u6301\u591a\u79cd\u6a21\u5f0f\uff0c\u5982\u8bfb\u53d6\uff08<code>&#39;r&#39;<\/code>\uff09\u3001\u5199\u5165\uff08<code>&#39;w&#39;<\/code>\uff09\u3001\u8ffd\u52a0\uff08<code>&#39;a&#39;<\/code>\uff09\u7b49\u3002\u9009\u62e9\u5408\u9002\u7684\u6a21\u5f0f\u5bf9\u6587\u4ef6\u64cd\u4f5c\u81f3\u5173\u91cd\u8981\u3002\u4f8b\u5982\uff0c\u4f7f\u7528\u5199\u5165\u6a21\u5f0f\u65f6\uff0c\u6587\u4ef6\u5982\u679c\u4e0d\u5b58\u5728\u4f1a\u88ab\u521b\u5efa\uff0c\u800c\u5982\u679c\u5df2\u7ecf\u5b58\u5728\uff0c\u5219\u4f1a\u88ab\u6e05\u7a7a\u3002\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u4ee3\u7801\u793a\u8303\u4e0d\u540c\u6a21\u5f0f\u7684\u7528\u6cd5\uff1a  <\/p>\n<pre><code class=\"language-python\">with open(&#39;filename.txt&#39;, &#39;w&#39;) as file:\n    file.write(&quot;\u8fd9\u662f\u65b0\u5185\u5bb9\u3002&quot;)\n<\/code><\/pre>\n<p>\u4e86\u89e3\u4e0d\u540c\u7684\u6587\u4ef6\u6a21\u5f0f\u80fd\u591f\u5e2e\u52a9\u7528\u6237\u5728\u5904\u7406\u6587\u4ef6\u65f6\u66f4\u52a0\u7075\u6d3b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u7528Python\u6253\u5f00\u4e00\u4e2a\u6587\u4ef6\u7684\u65b9\u6cd5\u4e3b\u8981\u6709\uff1a\u4f7f\u7528\u5185\u7f6e\u7684open()\u51fd\u6570\u3001\u4f7f\u7528\u4e0a\u4e0b\u6587\u7ba1\u7406\u5668with\u8bed\u53e5\u3001\u6307\u5b9a\u6587\u4ef6\u6a21\u5f0f [&hellip;]","protected":false},"author":3,"featured_media":1119453,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1119442"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=1119442"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1119442\/revisions"}],"predecessor-version":[{"id":1119457,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1119442\/revisions\/1119457"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1119453"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1119442"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1119442"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1119442"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}