{"id":30943,"date":"2022-12-25T04:50:46","date_gmt":"2022-10-31T18:56:53","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90php%e3%80%91%e6%97%a5%e6%9c%9f%e6%af%94%e8%be%83\/"},"modified":"2025-08-12T21:31:07","modified_gmt":"2025-08-12T13:31:07","slug":"%e3%80%90php%e3%80%91%e6%97%a5%e6%9c%9f%e6%af%94%e8%be%83","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90php%e3%80%91%e6%97%a5%e6%9c%9f%e6%af%94%e8%be%83\/","title":{"rendered":"\u3010PHP\u3011\u65e5\u671f\u6bd4\u8f83"},"content":{"rendered":"<p>\u6bcf\u6b21\u90fd\u5fd8\u8bb0\u6240\u4ee5\u8981\u8bb0\u4e00\u4e0b\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"nv\">$today<\/span> <span class=\"o\">=<\/span> <span class=\"nb\">date<\/span><span class=\"p\">(<\/span><span class=\"s2\">\"Y\/m\/d\"<\/span><span class=\"p\">);<\/span>\r\n<span class=\"nv\">$target_day<\/span> <span class=\"o\">=<\/span> <span class=\"s2\">\"2014\/06\/10\"<\/span><span class=\"p\">;<\/span>\r\n<span class=\"k\">if<\/span><span class=\"p\">(<\/span><span class=\"nb\">strtotime<\/span><span class=\"p\">(<\/span><span class=\"nv\">$today<\/span><span class=\"p\">)<\/span> <span class=\"o\">===<\/span> <span class=\"nb\">strtotime<\/span><span class=\"p\">(<\/span><span class=\"nv\">$target_day<\/span><span class=\"p\">)){<\/span>\r\n  <span class=\"k\">echo<\/span> <span class=\"s2\">\"\u30bf\u30fc\u30b2\u30c3\u30c8\u65e5\u4ed8\u306f\u4eca\u65e5\u3067\u3059\"<\/span><span class=\"p\">;<\/span>\r\n<span class=\"p\">}<\/span><span class=\"k\">else<\/span> <span class=\"k\">if<\/span><span class=\"p\">(<\/span><span class=\"nb\">strtotime<\/span><span class=\"p\">(<\/span><span class=\"nv\">$today<\/span><span class=\"p\">)<\/span> <span class=\"o\">&gt;<\/span> <span class=\"nb\">strtotime<\/span><span class=\"p\">(<\/span><span class=\"nv\">$target_day<\/span><span class=\"p\">)){<\/span>\r\n  <span class=\"k\">echo<\/span> <span class=\"s2\">\"\u30bf\u30fc\u30b2\u30c3\u30c8\u65e5\u4ed8\u306f\u904e\u53bb\u3067\u3059\"<\/span><span class=\"p\">;<\/span>\r\n<span class=\"p\">}<\/span><span class=\"k\">else<\/span><span class=\"p\">{<\/span>\r\n  <span class=\"k\">echo<\/span> <span class=\"s2\">\"\u30bf\u30fc\u30b2\u30c3\u30c8\u65e5\u4ed8\u306f\u672a\u6765\u3067\u3059\"<\/span><span class=\"p\">;<\/span>\r\n<span class=\"p\">}<\/span>\r\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u6bcf\u6b21\u90fd\u5fd8\u8bb0\u6240\u4ee5\u8981\u8bb0\u4e00\u4e0b\u3002 $today = date(&#8220;Y\/m\/d&#8221;); $target_day = &#8220;201 [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[227],"class_list":["post-30943","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\u65e5\u671f\u6bd4\u8f83 - Blog - Silicon Cloud<\/title>\n<meta name=\"description\" content=\"\u5173\u4e8e\u3010PHP\u3011\u65e5\u671f\u6bd4\u8f83\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\u65e5\u671f\u6bd4\u8f83\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u3010PHP\u3011\u65e5\u671f\u6bd4\u8f83\" \/>\n<meta property=\"og:description\" content=\"\u5173\u4e8e\u3010PHP\u3011\u65e5\u671f\u6bd4\u8f83\u7684\u6280\u672f\u6587\u7ae0\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u3010php\u3011\u65e5\u671f\u6bd4\u8f83\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2022-10-31T18:56:53+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-08-12T13:31:07+00:00\" \/>\n<meta name=\"author\" content=\"\u6e05, \u5b87\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u6e05, \u5b87\" \/>\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%e6%97%a5%e6%9c%9f%e6%af%94%e8%be%83\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90php%e3%80%91%e6%97%a5%e6%9c%9f%e6%af%94%e8%be%83\/\",\"name\":\"\u3010PHP\u3011\u65e5\u671f\u6bd4\u8f83 - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2022-10-31T18:56:53+00:00\",\"dateModified\":\"2025-08-12T13:31:07+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/1a6ecd3d914d22a5ac32791ffc1fbd8e\"},\"description\":\"\u5173\u4e8e\u3010PHP\u3011\u65e5\u671f\u6bd4\u8f83\u7684\u6280\u672f\u6587\u7ae0\",\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90php%e3%80%91%e6%97%a5%e6%9c%9f%e6%af%94%e8%be%83\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90php%e3%80%91%e6%97%a5%e6%9c%9f%e6%af%94%e8%be%83\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90php%e3%80%91%e6%97%a5%e6%9c%9f%e6%af%94%e8%be%83\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u3010PHP\u3011\u65e5\u671f\u6bd4\u8f83\"}]},{\"@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\/1a6ecd3d914d22a5ac32791ffc1fbd8e\",\"name\":\"\u6e05, \u5b87\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/4b2016c18459a605fc469c7566608f5686491baa112d0871ee613f61b7210565?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/4b2016c18459a605fc469c7566608f5686491baa112d0871ee613f61b7210565?s=96&d=mm&r=g\",\"caption\":\"\u6e05, \u5b87\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/qingyu\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90php%e3%80%91%e6%97%a5%e6%9c%9f%e6%af%94%e8%be%83\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u3010PHP\u3011\u65e5\u671f\u6bd4\u8f83 - Blog - Silicon Cloud","description":"\u5173\u4e8e\u3010PHP\u3011\u65e5\u671f\u6bd4\u8f83\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\u65e5\u671f\u6bd4\u8f83\/","og_locale":"zh_CN","og_type":"article","og_title":"\u3010PHP\u3011\u65e5\u671f\u6bd4\u8f83","og_description":"\u5173\u4e8e\u3010PHP\u3011\u65e5\u671f\u6bd4\u8f83\u7684\u6280\u672f\u6587\u7ae0","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u3010php\u3011\u65e5\u671f\u6bd4\u8f83\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2022-10-31T18:56:53+00:00","article_modified_time":"2025-08-12T13:31:07+00:00","author":"\u6e05, \u5b87","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u6e05, \u5b87","\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%e6%97%a5%e6%9c%9f%e6%af%94%e8%be%83\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90php%e3%80%91%e6%97%a5%e6%9c%9f%e6%af%94%e8%be%83\/","name":"\u3010PHP\u3011\u65e5\u671f\u6bd4\u8f83 - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2022-10-31T18:56:53+00:00","dateModified":"2025-08-12T13:31:07+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/1a6ecd3d914d22a5ac32791ffc1fbd8e"},"description":"\u5173\u4e8e\u3010PHP\u3011\u65e5\u671f\u6bd4\u8f83\u7684\u6280\u672f\u6587\u7ae0","breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90php%e3%80%91%e6%97%a5%e6%9c%9f%e6%af%94%e8%be%83\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90php%e3%80%91%e6%97%a5%e6%9c%9f%e6%af%94%e8%be%83\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90php%e3%80%91%e6%97%a5%e6%9c%9f%e6%af%94%e8%be%83\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u3010PHP\u3011\u65e5\u671f\u6bd4\u8f83"}]},{"@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\/1a6ecd3d914d22a5ac32791ffc1fbd8e","name":"\u6e05, \u5b87","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/4b2016c18459a605fc469c7566608f5686491baa112d0871ee613f61b7210565?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4b2016c18459a605fc469c7566608f5686491baa112d0871ee613f61b7210565?s=96&d=mm&r=g","caption":"\u6e05, \u5b87"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/qingyu\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90php%e3%80%91%e6%97%a5%e6%9c%9f%e6%af%94%e8%be%83\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/30943","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\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=30943"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/30943\/revisions"}],"predecessor-version":[{"id":83715,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/30943\/revisions\/83715"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=30943"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=30943"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=30943"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}