{"id":30184,"date":"2023-02-19T20:34:23","date_gmt":"2023-06-25T20:38:48","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90php%e3%80%91%e4%bd%bf%e7%94%a8php%e8%bf%9c%e7%a8%8b%e6%93%8d%e4%bd%9cpython\/"},"modified":"2025-08-12T17:58:23","modified_gmt":"2025-08-12T09:58:23","slug":"%e3%80%90php%e3%80%91%e4%bd%bf%e7%94%a8php%e8%bf%9c%e7%a8%8b%e6%93%8d%e4%bd%9cpython","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90php%e3%80%91%e4%bd%bf%e7%94%a8php%e8%bf%9c%e7%a8%8b%e6%93%8d%e4%bd%9cpython\/","title":{"rendered":"\u3010PHP\u3011\u4f7f\u7528PHP\u8fdc\u7a0b\u64cd\u4f5cPython"},"content":{"rendered":"<h1>\u5982\u4f55\u901a\u8fc7PHP\u8fdc\u7a0b\u64cd\u4f5cPython\uff1f<\/h1>\n<p>\u771f\u662f\u597d\u4e45\u4e0d\u89c1\u4e86\uff0c\u662fCarabon\u3002<br \/>\n\u6700\u8fd1\u7528PHP\u8fdc\u7a0b\u64cd\u4f5cPython\u6210\u529f\u4e86\uff0c\u6211\u6765\u4ecb\u7ecd\u4e00\u4e0b\u3002<\/p>\n<p>\u5927\u6982\u5c31\u662f\u8fd9\u6837\u7684\u611f\u89c9\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d063237434c4406bdb3e1\/3-0.gif\" alt=\"IMG_6164.gif\" \/><\/div>\n<p>\u8fd9\u4e2a\u600e\u4e48\u64cd\u4f5c\u7684\u5462\uff1f<\/p>\n<p>1. \u4f7f\u7528PHP\u521b\u5efa\u8868\u5355<\/p>\n<p>\u5728\u8868\u683c\u63d0\u4ea4\u7684\u4f4d\u7f6e\uff0c\u5c06\u8be5\u53d8\u91cf\u7684\u503c\u8bb0\u5f55\u5728JSON\u4e2d\u3002<\/p>\n<p>PHP\u90e8\u5206\u53ea\u6709\u8fd9\u4e48\u591a\u3002<\/p>\n<p>Python\u56e2\u961f<\/p>\n<p>\u5728\u67d0\u6b21\u5faa\u73af\u4e2d\uff0c\u5f53\u6761\u4ef6\u4e3a\u771f\u65f6\u8fdb\u884c\u5d4c\u5165json\u8bfb\u53d6\u3002<\/p>\n<p>\u5982\u679c\u5728json\u4e2d\u53d8\u6210&#8221;on&#8221;\u6216\u5176\u4ed6\u67d0\u4e2a\u60c5\u51b5\u53d1\u751f\u65f6\uff0c\u518d\u6b21\u8fdb\u5165while True\u5faa\u73af\u3002<\/p>\n<p>\u5982\u679c\u53ea\u60f3\u8981\u6267\u884c\u4e00\u6b21\u5904\u7406\uff0c\u8bf7\u5c06&#8221;off&#8221;\u7b49\u5185\u5bb9\u5199\u5165JSON\u4e2d\u3002<\/p>\n<p>\u5982\u679c\u4e0d\u60f3\u8981\u7684\u8bdd\u5c31\u4fdd\u6301\u539f\u6837\u3002<\/p>\n<p>\u5982\u679c\u51fa\u73b0off\u6216\u5176\u4ed6\u60c5\u51b5\uff0c\u5c31\u4e2d\u65ad\u6267\u884c\u3002<\/p>\n<p>\u8fd9\u5c31\u610f\u5473\u7740\u60a8\u53ef\u4ee5\u5b9e\u73b0\u5b9e\u8d28\u7684\u8fdc\u7a0b\u64cd\u4f5c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5982\u4f55\u901a\u8fc7PHP\u8fdc\u7a0b\u64cd\u4f5cPython\uff1f \u771f\u662f\u597d\u4e45\u4e0d\u89c1\u4e86\uff0c\u662fCarabon\u3002 \u6700\u8fd1\u7528PHP\u8fdc\u7a0b\u64cd\u4f5cPython\u6210\u529f [&hellip;]<\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[227],"class_list":["post-30184","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-227"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u3010PHP\u3011\u4f7f\u7528PHP\u8fdc\u7a0b\u64cd\u4f5cPython - Blog - Silicon Cloud<\/title>\n<meta name=\"description\" content=\"\u5173\u4e8e\u3010PHP\u3011\u4f7f\u7528PHP\u8fdc\u7a0b\u64cd\u4f5cPython\u7684\u6280\u672f\u6587\u7ae0\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/zh\/blog\/\u3010php\u3011\u4f7f\u7528php\u8fdc\u7a0b\u64cd\u4f5cpython\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u3010PHP\u3011\u4f7f\u7528PHP\u8fdc\u7a0b\u64cd\u4f5cPython\" \/>\n<meta property=\"og:description\" content=\"\u5173\u4e8e\u3010PHP\u3011\u4f7f\u7528PHP\u8fdc\u7a0b\u64cd\u4f5cPython\u7684\u6280\u672f\u6587\u7ae0\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u3010php\u3011\u4f7f\u7528php\u8fdc\u7a0b\u64cd\u4f5cpython\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-06-25T20:38:48+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-08-12T09:58:23+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d063237434c4406bdb3e1\/3-0.gif\" \/>\n<meta name=\"author\" content=\"\u5b87, \u534e\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u5b87, \u534e\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90php%e3%80%91%e4%bd%bf%e7%94%a8php%e8%bf%9c%e7%a8%8b%e6%93%8d%e4%bd%9cpython\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90php%e3%80%91%e4%bd%bf%e7%94%a8php%e8%bf%9c%e7%a8%8b%e6%93%8d%e4%bd%9cpython\/\",\"name\":\"\u3010PHP\u3011\u4f7f\u7528PHP\u8fdc\u7a0b\u64cd\u4f5cPython - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2023-06-25T20:38:48+00:00\",\"dateModified\":\"2025-08-12T09:58:23+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/513018e4e121d3add1b7c5de8be21458\"},\"description\":\"\u5173\u4e8e\u3010PHP\u3011\u4f7f\u7528PHP\u8fdc\u7a0b\u64cd\u4f5cPython\u7684\u6280\u672f\u6587\u7ae0\",\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90php%e3%80%91%e4%bd%bf%e7%94%a8php%e8%bf%9c%e7%a8%8b%e6%93%8d%e4%bd%9cpython\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90php%e3%80%91%e4%bd%bf%e7%94%a8php%e8%bf%9c%e7%a8%8b%e6%93%8d%e4%bd%9cpython\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90php%e3%80%91%e4%bd%bf%e7%94%a8php%e8%bf%9c%e7%a8%8b%e6%93%8d%e4%bd%9cpython\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u3010PHP\u3011\u4f7f\u7528PHP\u8fdc\u7a0b\u64cd\u4f5cPython\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/513018e4e121d3add1b7c5de8be21458\",\"name\":\"\u5b87, \u534e\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/63cd45cbc05a35fc4ff7637a163c83c4962ef58d27472726c3a3e0c9c5194f0f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/63cd45cbc05a35fc4ff7637a163c83c4962ef58d27472726c3a3e0c9c5194f0f?s=96&d=mm&r=g\",\"caption\":\"\u5b87, \u534e\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/yuhua\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90php%e3%80%91%e4%bd%bf%e7%94%a8php%e8%bf%9c%e7%a8%8b%e6%93%8d%e4%bd%9cpython\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u3010PHP\u3011\u4f7f\u7528PHP\u8fdc\u7a0b\u64cd\u4f5cPython - Blog - Silicon Cloud","description":"\u5173\u4e8e\u3010PHP\u3011\u4f7f\u7528PHP\u8fdc\u7a0b\u64cd\u4f5cPython\u7684\u6280\u672f\u6587\u7ae0","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/zh\/blog\/\u3010php\u3011\u4f7f\u7528php\u8fdc\u7a0b\u64cd\u4f5cpython\/","og_locale":"zh_CN","og_type":"article","og_title":"\u3010PHP\u3011\u4f7f\u7528PHP\u8fdc\u7a0b\u64cd\u4f5cPython","og_description":"\u5173\u4e8e\u3010PHP\u3011\u4f7f\u7528PHP\u8fdc\u7a0b\u64cd\u4f5cPython\u7684\u6280\u672f\u6587\u7ae0","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u3010php\u3011\u4f7f\u7528php\u8fdc\u7a0b\u64cd\u4f5cpython\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-06-25T20:38:48+00:00","article_modified_time":"2025-08-12T09:58:23+00:00","og_image":[{"url":"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d063237434c4406bdb3e1\/3-0.gif"}],"author":"\u5b87, \u534e","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u5b87, \u534e","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90php%e3%80%91%e4%bd%bf%e7%94%a8php%e8%bf%9c%e7%a8%8b%e6%93%8d%e4%bd%9cpython\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90php%e3%80%91%e4%bd%bf%e7%94%a8php%e8%bf%9c%e7%a8%8b%e6%93%8d%e4%bd%9cpython\/","name":"\u3010PHP\u3011\u4f7f\u7528PHP\u8fdc\u7a0b\u64cd\u4f5cPython - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2023-06-25T20:38:48+00:00","dateModified":"2025-08-12T09:58:23+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/513018e4e121d3add1b7c5de8be21458"},"description":"\u5173\u4e8e\u3010PHP\u3011\u4f7f\u7528PHP\u8fdc\u7a0b\u64cd\u4f5cPython\u7684\u6280\u672f\u6587\u7ae0","breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90php%e3%80%91%e4%bd%bf%e7%94%a8php%e8%bf%9c%e7%a8%8b%e6%93%8d%e4%bd%9cpython\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90php%e3%80%91%e4%bd%bf%e7%94%a8php%e8%bf%9c%e7%a8%8b%e6%93%8d%e4%bd%9cpython\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90php%e3%80%91%e4%bd%bf%e7%94%a8php%e8%bf%9c%e7%a8%8b%e6%93%8d%e4%bd%9cpython\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u3010PHP\u3011\u4f7f\u7528PHP\u8fdc\u7a0b\u64cd\u4f5cPython"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/513018e4e121d3add1b7c5de8be21458","name":"\u5b87, \u534e","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/63cd45cbc05a35fc4ff7637a163c83c4962ef58d27472726c3a3e0c9c5194f0f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/63cd45cbc05a35fc4ff7637a163c83c4962ef58d27472726c3a3e0c9c5194f0f?s=96&d=mm&r=g","caption":"\u5b87, \u534e"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/yuhua\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90php%e3%80%91%e4%bd%bf%e7%94%a8php%e8%bf%9c%e7%a8%8b%e6%93%8d%e4%bd%9cpython\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/30184","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=30184"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/30184\/revisions"}],"predecessor-version":[{"id":86063,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/30184\/revisions\/86063"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=30184"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=30184"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=30184"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}