{"id":60945,"date":"2025-01-11T12:27:46","date_gmt":"2025-01-11T04:27:46","guid":{"rendered":"https:\/\/0592ban.cn\/?p=60945"},"modified":"2025-01-11T12:27:46","modified_gmt":"2025-01-11T04:27:46","slug":"2002%e5%b9%b47%e6%9c%886%e6%97%a5%e6%88%8c%e6%97%b6%e7%94%9f%e8%be%b0%e5%85%ab%e5%ad%97%e8%a7%a3%e8%af%bb-2002%e5%b9%b47%e6%9c%88%e5%87%ba%e7%94%9f%e7%9a%84%e4%bb%8a%e5%b9%b4%e5%87%a0%e5%b2%81","status":"publish","type":"post","link":"https:\/\/0592ban.cn\/index.php\/2025\/01\/11\/2002%e5%b9%b47%e6%9c%886%e6%97%a5%e6%88%8c%e6%97%b6%e7%94%9f%e8%be%b0%e5%85%ab%e5%ad%97%e8%a7%a3%e8%af%bb-2002%e5%b9%b47%e6%9c%88%e5%87%ba%e7%94%9f%e7%9a%84%e4%bb%8a%e5%b9%b4%e5%87%a0%e5%b2%81\/","title":{"rendered":"2002\u5e747\u67086\u65e5\u620c\u65f6\u751f\u8fb0\u516b\u5b57\u89e3\u8bfb (2002\u5e747\u6708\u51fa\u751f\u7684\u4eca\u5e74\u51e0\u5c81)"},"content":{"rendered":"<p><img decoding=\"async\" alt=\"2002\u5e747\u6708\u51fa\u751f\u7684\u4eca\u5e74\u51e0\u5c81\" loading=\"lazy\" src=\"https:\/\/0592ban.cn\/wp-content\/uploads\/2025\/01\/69a00b98-60bb-4937-a56e-7e5e975eba7a.jpg\"\/><\/p>\n<p>\n \u8bf7\u8f93\u5165\u60a8\u7684\u51fa\u751f\u65e5\u671f\uff08\u516c\u5386\u6216\u519c\u5386\u5747\u53ef\uff09\uff1a\n<\/p>\n<form action=\"result.php\" method=\"post\">\n <label for=\"birth_date\"><br \/>\n  \u51fa\u751f\u65e5\u671f\uff1a<br \/>\n <\/label><br \/>\n <input id=\"birth_date\" name=\"birth_date\" type=\"text\"\/><br \/>\n <input type=\"submit\" value=\"\u67e5\u8be2\"\/><br \/>\n<\/form>\n<p><!--?php\n    if (isset($_POST['birth_date'])) {\n      $birth_date = $_POST['birth_date'];\n\n      \/\/ \u5904\u7406\u516c\u5386\u65e5\u671f\n      if (preg_match('\/^(\\d{4})-(\\d{2})-(\\d{2}) (\\d{2}):(\\d{2})-(\\d{2})$\/', $birth_date,d{2})(\\d{2})(\\d{2}) (\\d{2}):(\\d{2})$\/', $birth_date, $matches)) {\n        $year = \"19\" . $matches[1];\n        $month = $matches[2];\n        $day = $matches[3];\n        $hour = $matches[4];\n        $minute = $matches[5];\n        $second = \"00\";\n\n        \/\/ \u8f6c\u6362\u4e3a\u516c\u5386\n        $solar_date = toSolar($year, $month, $day, $hour, $minute, $second);\n\n        \/\/ \u8f93\u51fa\u7ed3\u679c\n        echo \"<p-->\n\u519c\u5386\u51fa\u751f\u65e5\u671f\uff1a{$birth_date}<br \/>\n&#8220;;<br \/>\n        echo &#8221;<\/p>\n<p>\n \u516c\u5386\u51fa\u751f\u65e5\u671f\uff1a{$solar_date}\n<\/p>\n<p>&#8220;;<\/p>\n<p>        \/\/ \u8ba1\u7b97\u516b\u5b57<br \/>\n        $eight_characters = calculateEightCharacters($year, $month, $day, $hour, $minute, $second);<\/p>\n<p>        \/\/ \u8f93\u51fa\u516b\u5b57<br \/>\n        echo &#8221;<\/p>\n<p>\n \u516b\u5b57\uff1a{$eight_characters}\n<\/p>\n<p>&#8220;;<\/p>\n<p>        \/\/ \u8ba1\u7b97\u4e94\u884c<br \/>\n        $five_elements = calculateFiveElements($eight_characters);<\/p>\n<p>        \/\/ \u8f93\u51fa\u4e94\u884c<br \/>\n        echo &#8221;<\/p>\n<p>\n \u4e94\u884c\uff1a{$five_elements}\n<\/p>\n<p>&#8220;;<br \/>\n      }<br \/>\n      else {<br \/>\n        echo &#8221;<\/p>\n<p>\n \u65e5\u671f\u683c\u5f0f\u4e0d\u6b63\u786e\uff0c\u8bf7\u91cd\u65b0\u8f93\u5165\u3002\n<\/p>\n<p>&#8220;;<br \/>\n      }<br \/>\n    }<br \/>\n  ?&gt;<\/p>\n<p>php<br \/>\n\/\/ \u519c\u5386\u8f6c\u516c\u5386<br \/>\nfunction toSolar($year, $month, $day, $hour, $minute, $second) {<br \/>\n  $lunar_data = array(<br \/>\n    array(1887, 12, 2, 12,  1,  21, 23,  5,  0),<br \/>\n    array(1888,  1, 23, 12,  1, 22,  0,  6,  1),<br \/>\n    array(1888,  2, 20, 12,  1, 23,  6,  7,  2),<br \/>\n    array(1889,  1, 19, 12,  1, 24,  0,  8,  3),<br \/>\n    array(1889,  2, 18, 12,  1,  5,  6,  9,  4),<br \/>\n    array(1889,  3, 18, 12,  1, 26,  0, 10,  5),<br \/>\n    array(1890,  1, 15, 12,  1, 27, 6, 11,  6),<br \/>\n    array(1890,  2, 13, 12,  1, 28,  0, 12,  7),<br \/>\n    array(1891,  1, 12, 12,  1,  1,  6, 13,  8),<br \/>\n    array(1891,  2, 11, 12,  1, 22,  0, 14,  9),<br \/>\n    array(1892,  1,  1, 12,  1, 23, 6, 15, 10),<br \/>\n    array(1892,  2,  1, 12,  1,  4,  0, 16, 11),<br \/>\n    array(1893,  1, 20, 12,  1, 15, 6, 17, 12),<br \/>\n    array(1893,  2, 19, 12,  1, 26,  0, 18, 13),<br \/>\n    array(1894,  1, 18, 12,  1, 27, 6, 19, 14),<br \/>\n    array(1894,  2, 17, 12,  1, 28,  1, 20, 15),<br \/>\n    array(1895,  1, 15, 12,  2, 10, 6, 21, 16),<br \/>\n    array(1895,  2, 13, 12,  2, 21,  0, 22, 17),<br \/>\n    array(1896,  1,  3, 12,  2, 22, 6, 23, 18),<br \/>\n    array(1896,  2,  1, 12,  2,  3,  1, 24, 19),<br \/>\n    array(1897,  1, 21, 12,  2, 14, 6, 25, 20),<br \/>\n    array(1897,  2, 20, 12,  2, 25,  2, 26, 21),<br \/>\n    array(1898,  1, 19, 12,  2, 26, 7, 27, 22),<br \/>\n    array(1898,  2, 18, 12,  2,  7,  3, 28, 23),<br \/>\n    array(1899,  1, 17, 12,  2, 18, 8,  1, 24),<br \/>\n    array(1899,  2, 16, 12,  2, 27,  4,  2, 25),<br \/>\n    array(1900,  1, 15, 12,  3, 10, 9,  3, 26),<br \/>\n    array(1900,  2, 13, 12,  3, 21,  5,  4, 27),<br \/>\n    array(1901,  1, 12, 12,  3, 22, 10,  5, 28),<br \/>\n    array(1901,  2, 10, 12,  3, 23,  6,  6, 29),<br \/>\n    array(1902,  1,  1, 12,  4,  5, 11,  7, 30),<br \/>\n    array(1902,  2,  1, 12,  4, 16,  7,  8,  1),<br \/>\n    array(1903,  1, 21,<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8bf7\u8f93\u5165\u60a8\u7684\u51fa\u751f\u65e5\u671f\uff0c\u516c\u5386\u6216\u519c\u5386\u5747\u53ef\uff0c\u51fa\u751f\u65e5\u671f\uff0c\u519c\u5386\u51fa\u751f\u65e5\u671f\uff0c$birth\uff0cdate\uff0cecho\u516c\u5386\u51fa\u751f\u65e5\u671f\uff0c$solar\uff0cdate\uff0c\u8ba1\u7b97\u516b\u5b57$eight\uff0ccharacters=calculateEightCharacters\uff0c$year\uff0c$month\uff0c$day\uff0c$hour\uff0c$minute\uff0c$second\uff0c\u8f93\u51fa\u516b\u5b57ec&#8230;\u3002<\/p>\n","protected":false},"author":1,"featured_media":60944,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[26420],"class_list":["post-60945","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-12shengxiao","tag-26420"],"_links":{"self":[{"href":"https:\/\/0592ban.cn\/index.php\/wp-json\/wp\/v2\/posts\/60945","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/0592ban.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/0592ban.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/0592ban.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/0592ban.cn\/index.php\/wp-json\/wp\/v2\/comments?post=60945"}],"version-history":[{"count":1,"href":"https:\/\/0592ban.cn\/index.php\/wp-json\/wp\/v2\/posts\/60945\/revisions"}],"predecessor-version":[{"id":60946,"href":"https:\/\/0592ban.cn\/index.php\/wp-json\/wp\/v2\/posts\/60945\/revisions\/60946"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/0592ban.cn\/index.php\/wp-json\/wp\/v2\/media\/60944"}],"wp:attachment":[{"href":"https:\/\/0592ban.cn\/index.php\/wp-json\/wp\/v2\/media?parent=60945"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/0592ban.cn\/index.php\/wp-json\/wp\/v2\/categories?post=60945"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/0592ban.cn\/index.php\/wp-json\/wp\/v2\/tags?post=60945"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}