{"id":1330,"date":"2024-11-10T10:31:31","date_gmt":"2024-11-10T02:31:31","guid":{"rendered":"https:\/\/fwq.ai\/blog\/1330\/"},"modified":"2024-11-10T10:31:31","modified_gmt":"2024-11-10T02:31:31","slug":"%e5%a6%82%e4%bd%95%e9%80%89%e6%8b%a9%e5%ae%9e%e7%94%a8%e7%9a%84-php-%e6%97%a5%e5%8e%86%e7%ad%be%e5%88%b0%e6%8f%92%e4%bb%b6%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/1330\/","title":{"rendered":"\u5982\u4f55\u9009\u62e9\u5b9e\u7528\u7684 PHP \u65e5\u5386\u7b7e\u5230\u63d2\u4ef6\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173036919980935.jpg\" class=\"aligncenter\" title=\"\u5982\u4f55\u9009\u62e9\u5b9e\u7528\u7684 PHP \u65e5\u5386\u7b7e\u5230\u63d2\u4ef6\uff1f\u63d2\u56fe\" alt=\"\u5982\u4f55\u9009\u62e9\u5b9e\u7528\u7684 PHP \u65e5\u5386\u7b7e\u5230\u63d2\u4ef6\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5bfb\u627e\u5b9e\u7528\u7684 php \u65e5\u5386\u7b7e\u5230\u63d2\u4ef6<\/strong><\/p>\n<p>\u8bb8\u591a\u5f00\u53d1\u4eba\u5458\u90fd\u5728\u5bfb\u627e\u53ef\u7528\u4e8e web \u7aef\u5f00\u53d1\u7684\u65e5\u5386\u7b7e\u5230\u63d2\u4ef6\u3002\u7136\u800c\uff0c\u7f51\u4e0a\u5145\u65a5\u7740\u4e0d\u53ef\u7528\u7684\u63d2\u4ef6\uff0c\u7ed9\u7528\u6237\u5e26\u6765\u4e86\u4e0d\u4fbf\u3002<\/p>\n<p><strong>\u63a8\u8350\u7684\u63d2\u4ef6\uff1ajquery.datetimepicker<\/strong><\/p>\n<p>\u7ecf\u8fc7\u5b9e\u9645\u4f7f\u7528\uff0c\u6211\u4eec\u5f3a\u70c8\u63a8\u8350\u4f7f\u7528 jquery.datetimepicker \u63d2\u4ef6\u3002\u5b83\u662f\u4e00\u6b3e\u8f7b\u91cf\u7ea7\u4e14\u6613\u4e8e\u96c6\u6210\u7684 javascript \u5e93\uff0c\u63d0\u4f9b\u4e86\u5168\u9762\u4e14\u53ef\u5b9a\u5236\u7684\u65e5\u5386\u7b7e\u5230\u529f\u80fd\u3002<\/p>\n<p><span>\u7acb\u5373\u5b66\u4e60<\/span>\u201c\u201d\uff1b<\/p>\n<p><strong>\u4f7f\u7528\u65b9\u6cd5<\/strong><\/p>\n<ol>\n<li>\u5c06 jquery.datetimepicker.js \u6587\u4ef6\u5305\u542b\u5230\u60a8\u7684\u9875\u9762\u4e2d\u3002<\/li>\n<li>\u521b\u5efa\u4e00\u4e2a html \u5143\u7d20\u5e76\u8bbe\u7f6e\u5176 data-date \u5c5e\u6027\u4ee5\u6307\u5b9a\u521d\u59cb\u65e5\u671f\u3002<\/li>\n<li>\u8c03\u7528 jquery \u65e5\u671f\u9009\u62e9\u5668\u63d2\u4ef6\u5e76\u6307\u5b9a\u6240\u9700\u9009\u9879\u3002<\/li>\n<\/ol>\n<p>\u4f8b\u5982\uff1a<\/p>\n<pre>&lt;input type=\"text\" id=\"date\" data-date=\"2023-03-13\"&gt;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<pre>$('#date').datetimepicker({\n  format: 'DD\/MM\/YYYY'\n});<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u6b64\u793a\u4f8b\u521b\u5efa\u4e00\u4e2a\u5177\u6709 dd\/mm\/yy \u683c\u5f0f\u7684\u65e5\u5386\u9009\u62e9\u5668\u3002<\/p>\n<p><strong>\u4f18\u70b9<\/strong><\/p>\n<ul>\n<li>\u8f7b\u91cf\u7ea7\u548c\u6613\u4e8e\u96c6\u6210<\/li>\n<li>\u9ad8\u5ea6\u53ef\u5b9a\u5236\uff0c\u652f\u6301\u591a\u79cd\u65e5\u671f\u683c\u5f0f\u548c\u663e\u793a\u9009\u9879<\/li>\n<li>\u8de8\u6d4f\u89c8\u5668\u517c\u5bb9\uff0c\u53ef\u4ee5\u5728\u5404\u79cd\u8bbe\u5907\u4e0a\u6b63\u5e38\u8fd0\u884c<\/li>\n<li>\u63d0\u4f9b\u4e30\u5bcc\u7684\u6587\u6863\u548c\u793a\u4f8b<\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u9009\u62e9\u5b9e\u7528\u7684 PHP \u65e5\u5386\u7b7e\u5230\u63d2\u4ef6\uff1f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5bfb\u627e\u5b9e\u7528\u7684 php \u65e5\u5386\u7b7e\u5230\u63d2\u4ef6 \u8bb8\u591a\u5f00\u53d1\u4eba\u5458\u90fd\u5728\u5bfb\u627e\u53ef\u7528\u4e8e web \u7aef\u5f00\u53d1\u7684\u65e5\u5386\u7b7e\u5230\u63d2\u4ef6\u3002\u7136\u800c\uff0c\u7f51\u4e0a\u5145\u65a5\u7740\u4e0d\u53ef\u7528\u7684\u63d2\u4ef6\uff0c\u7ed9\u7528\u6237\u5e26\u6765\u4e86\u4e0d\u4fbf\u3002 \u63a8\u8350\u7684\u63d2\u4ef6\uff1ajquery.datetimepicker \u7ecf\u8fc7\u5b9e\u9645\u4f7f\u7528\uff0c\u6211\u4eec\u5f3a\u70c8\u63a8\u8350\u4f7f\u7528 jquery.datetimepicker \u63d2\u4ef6\u3002\u5b83\u662f\u4e00\u6b3e\u8f7b\u91cf\u7ea7\u4e14\u6613\u4e8e\u96c6\u6210\u7684 javascript \u5e93\uff0c\u63d0\u4f9b\u4e86\u5168\u9762\u4e14\u53ef\u5b9a\u5236\u7684\u65e5\u5386\u7b7e\u5230\u529f\u80fd\u3002 \u7acb\u5373\u5b66\u4e60\u201c\u201d\uff1b \u4f7f\u7528\u65b9\u6cd5 \u5c06 jquery.datetimepicker.js \u6587\u4ef6\u5305\u542b\u5230\u60a8\u7684\u9875\u9762\u4e2d\u3002 \u521b\u5efa\u4e00\u4e2a html \u5143\u7d20\u5e76\u8bbe\u7f6e\u5176 data-date \u5c5e\u6027\u4ee5\u6307\u5b9a\u521d\u59cb\u65e5\u671f\u3002 \u8c03\u7528 jquery \u65e5\u671f\u9009\u62e9\u5668\u63d2\u4ef6\u5e76\u6307\u5b9a\u6240\u9700\u9009\u9879\u3002 \u4f8b\u5982\uff1a &lt;input type=&#8221;text&#8221; id=&#8221;date&#8221; data-date=&#8221;2023-03-13&#8243;&gt; \u767b\u5f55\u540e\u590d\u5236 $(&#8216;#date&#8217;).datetimepicker({ format: &#8216;DD\/MM\/YYYY&#8217; }); \u767b\u5f55\u540e\u590d\u5236 \u6b64\u793a\u4f8b\u521b\u5efa\u4e00\u4e2a\u5177\u6709 dd\/mm\/yy \u683c\u5f0f\u7684\u65e5\u5386\u9009\u62e9\u5668\u3002 \u4f18\u70b9 \u8f7b\u91cf\u7ea7\u548c\u6613\u4e8e\u96c6\u6210 \u9ad8\u5ea6\u53ef\u5b9a\u5236\uff0c\u652f\u6301\u591a\u79cd\u65e5\u671f\u683c\u5f0f\u548c\u663e\u793a\u9009\u9879 \u8de8\u6d4f\u89c8\u5668\u517c\u5bb9\uff0c\u53ef\u4ee5\u5728\u5404\u79cd\u8bbe\u5907\u4e0a\u6b63\u5e38\u8fd0\u884c \u63d0\u4f9b\u4e30\u5bcc\u7684\u6587\u6863\u548c\u793a\u4f8b \u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u9009\u62e9\u5b9e\u7528\u7684 PHP \u65e5\u5386\u7b7e\u5230\u63d2\u4ef6\uff1f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-1330","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/1330","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=1330"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/1330\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=1330"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=1330"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=1330"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}