{"id":33734,"date":"2024-11-25T17:59:51","date_gmt":"2024-11-25T09:59:51","guid":{"rendered":"https:\/\/fwq.ai\/blog\/33734\/"},"modified":"2024-11-25T17:59:51","modified_gmt":"2024-11-25T09:59:51","slug":"%e5%b8%9d%e5%9b%bdcms%e8%ae%b0%e5%bd%95%e7%94%a8%e6%88%b7%e7%82%b9%e5%87%bb%e7%9a%84%e6%97%b6%e9%97%b4%e6%80%8e%e4%b9%88%e7%9c%8b%e4%b8%8d%e4%ba%86%e4%ba%86","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/33734\/","title":{"rendered":"\u5e1d\u56fdcms\u8bb0\u5f55\u7528\u6237\u70b9\u51fb\u7684\u65f6\u95f4\u600e\u4e48\u770b\u4e0d\u4e86\u4e86"},"content":{"rendered":"<blockquote><p>\n  \u5e1d\u56fdcms\u63d0\u4f9b\u4e86lastdotime\uff08\u6700\u540e\u70b9\u51fb\u65f6\u95f4\u6233\uff09\u548clastvotenum\uff08\u6700\u540e\u6295\u7968\u65f6\u95f4\u6233\uff09\u5b57\u6bb5\u6765\u8bb0\u5f55\u7528\u6237\u70b9\u51fb\u65f6\u95f4\u3002\u67e5\u770b\u65b9\u6cd5\u5305\u62ec\uff1a\u6253\u5f00\u6570\u636e\u5e93\uff0c\u67e5\u627eecms_article\u6570\u636e\u8868\uff0c\u6267\u884csql\u67e5\u8be2\uff08select lastdotime, lastvotenum from ecs_article where id = [\u6587\u7ae0id]\uff09\uff0c\u89e3\u91ca\u7ed3\u679c\uff08lastdotime\u548clastvotenum\u7684\u503c\u4e3a\u65f6\u95f4\u6233\uff09\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202404\/16\/2024041616514437176.jpg\" class=\"aligncenter\" title=\"\u5e1d\u56fdcms\u8bb0\u5f55\u7528\u6237\u70b9\u51fb\u7684\u65f6\u95f4\u600e\u4e48\u770b\u4e0d\u4e86\u4e86\u63d2\u56fe\" alt=\"\u5e1d\u56fdcms\u8bb0\u5f55\u7528\u6237\u70b9\u51fb\u7684\u65f6\u95f4\u600e\u4e48\u770b\u4e0d\u4e86\u4e86\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5e1d\u56fdCMS\u4e2d\u67e5\u770b\u7528\u6237\u70b9\u51fb\u65f6\u95f4\u7684\u65b9\u6cd5<\/strong><\/p>\n<p><strong>\u95ee\u9898\uff1a<\/strong>\u5982\u4f55\u5728\u5e1d\u56fdCMS\u4e2d\u67e5\u770b\u7528\u6237\u70b9\u51fb\u65f6\u95f4\uff1f<\/p>\n<p><strong>\u56de\u7b54\uff1a<\/strong><\/p>\n<p>\u5e1d\u56fdCMS\u4e2d\u63d0\u4f9b\u4e86\u4e24\u4e2a\u5185\u7f6e\u5b57\u6bb5\u6765\u8bb0\u5f55\u7528\u6237\u70b9\u51fb\u65f6\u95f4\uff1a<\/p>\n<ul>\n<li>lastdotime\uff1a\u8bb0\u5f55\u7528\u6237\u6700\u540e\u4e00\u6b21\u70b9\u51fb\u6587\u7ae0\u7684\u65f6\u95f4\u6233\u3002<\/li>\n<li>lastvotenum\uff1a\u8bb0\u5f55\u7528\u6237\u6700\u540e\u4e00\u6b21\u6295\u7968\u7684\u65f6\u95f4\u6233\u3002<\/li>\n<\/ul>\n<p><strong>\u67e5\u770b\u65b9\u6cd5\uff1a<\/strong><\/p>\n<ol>\n<li><strong>\u6b65\u9aa4\u4e00\uff1a\u6253\u5f00\u5e1d\u56fdCMS\u6570\u636e\u5e93<\/strong><\/li>\n<\/ol>\n<p>\u4f7f\u7528\u6570\u636e\u5e93\u7ba1\u7406\u5de5\u5177\uff08\u5982 phpMyAdmin\uff09\u6253\u5f00\u5e1d\u56fdCMS\u6570\u636e\u5e93\u3002<\/p>\n<ol>\n<li><strong>\u6b65\u9aa4\u4e8c\uff1a\u67e5\u627e\u6570\u636e\u8868<\/strong><\/li>\n<\/ol>\n<p>\u627e\u5230\u540d\u4e3a ecms_article \u7684\u6570\u636e\u8868\uff0c\u5176\u4e2d\u5b58\u50a8\u4e86\u6587\u7ae0\u76f8\u5173\u6570\u636e\uff0c\u5305\u62ec\u70b9\u51fb\u65f6\u95f4\u3002<\/p>\n<ol>\n<li><strong>\u6b65\u9aa4\u4e09\uff1a\u67e5\u8be2\u6570\u636e<\/strong><\/li>\n<\/ol>\n<p>\u6267\u884c\u4ee5\u4e0b SQL \u67e5\u8be2\u4ee5\u83b7\u53d6\u7528\u6237\u70b9\u51fb\u65f6\u95f4\uff1a<\/p>\n<pre>SELECT lastdotime, lastvotenum\nFROM ecs_article\nWHERE id = [\u6587\u7ae0ID]<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u5176\u4e2d\uff0c[\u6587\u7ae0ID] \u5e94\u66ff\u6362\u4e3a\u8981\u67e5\u8be2\u7684\u6587\u7ae0\u7684 ID\u3002<\/p>\n<ol>\n<li><strong>\u6b65\u9aa4\u56db\uff1a\u89e3\u91ca\u7ed3\u679c<\/strong><\/li>\n<\/ol>\n<p>\u67e5\u8be2\u7ed3\u679c\u5c06\u663e\u793a\u4e24\u4e2a\u503c\uff1a<\/p>\n<ul>\n<li>lastdotime\uff1a\u4ee5\u65f6\u95f4\u6233\u683c\u5f0f\u663e\u793a\u7528\u6237\u6700\u540e\u4e00\u6b21\u70b9\u51fb\u6587\u7ae0\u7684\u65f6\u95f4\u3002<\/li>\n<li>lastvotenum\uff1a\u4ee5\u65f6\u95f4\u6233\u683c\u5f0f\u663e\u793a\u7528\u6237\u6700\u540e\u4e00\u6b21\u6295\u7968\u6587\u7ae0\u7684\u65f6\u95f4\u3002<\/li>\n<\/ul>\n<p>\u60a8\u53ef\u4ee5\u5c06\u8fd9\u4e9b\u65f6\u95f4\u6233\u8f6c\u6362\u4e3a\u53ef\u8bfb\u683c\u5f0f\uff0c\u4f8b\u5982\u4f7f\u7528\u4ee5\u4e0b PHP \u4ee3\u7801\uff1a<\/p>\n<pre>$lastDoTime = strtotime($lastdotime);\n$lastDoTimeReadable = date('Y-m-d H:i:s', $lastDoTime);<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u8bb0\u5f55\u7528\u6237\u70b9\u51fb\u7684\u65f6\u95f4\u600e\u4e48\u770b\u4e0d\u4e86\u4e86\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>\u5e1d\u56fdcms\u63d0\u4f9b\u4e86lastdotime\uff08\u6700\u540e\u70b9\u51fb\u65f6\u95f4\u6233\uff09\u548clastvotenum\uff08\u6700\u540e\u6295\u7968\u65f6\u95f4\u6233\uff09\u5b57\u6bb5\u6765\u8bb0\u5f55\u7528\u6237\u70b9\u51fb\u65f6\u95f4\u3002\u67e5\u770b\u65b9\u6cd5\u5305\u62ec\uff1a\u6253\u5f00\u6570\u636e\u5e93\uff0c\u67e5\u627eecms_article\u6570\u636e\u8868\uff0c\u6267\u884csql\u67e5\u8be2\uff08select lastdotime, lastvotenum from ecs_article where id = [\u6587\u7ae0id]\uff09\uff0c\u89e3\u91ca\u7ed3\u679c\uff08lastdotime\u548clastvotenum\u7684\u503c\u4e3a\u65f6\u95f4\u6233\uff09\u3002 \u5e1d\u56fdCMS\u4e2d\u67e5\u770b\u7528\u6237\u70b9\u51fb\u65f6\u95f4\u7684\u65b9\u6cd5 \u95ee\u9898\uff1a\u5982\u4f55\u5728\u5e1d\u56fdCMS\u4e2d\u67e5\u770b\u7528\u6237\u70b9\u51fb\u65f6\u95f4\uff1f \u56de\u7b54\uff1a \u5e1d\u56fdCMS\u4e2d\u63d0\u4f9b\u4e86\u4e24\u4e2a\u5185\u7f6e\u5b57\u6bb5\u6765\u8bb0\u5f55\u7528\u6237\u70b9\u51fb\u65f6\u95f4\uff1a lastdotime\uff1a\u8bb0\u5f55\u7528\u6237\u6700\u540e\u4e00\u6b21\u70b9\u51fb\u6587\u7ae0\u7684\u65f6\u95f4\u6233\u3002 lastvotenum\uff1a\u8bb0\u5f55\u7528\u6237\u6700\u540e\u4e00\u6b21\u6295\u7968\u7684\u65f6\u95f4\u6233\u3002 \u67e5\u770b\u65b9\u6cd5\uff1a \u6b65\u9aa4\u4e00\uff1a\u6253\u5f00\u5e1d\u56fdCMS\u6570\u636e\u5e93 \u4f7f\u7528\u6570\u636e\u5e93\u7ba1\u7406\u5de5\u5177\uff08\u5982 phpMyAdmin\uff09\u6253\u5f00\u5e1d\u56fdCMS\u6570\u636e\u5e93\u3002 \u6b65\u9aa4\u4e8c\uff1a\u67e5\u627e\u6570\u636e\u8868 \u627e\u5230\u540d\u4e3a ecms_article \u7684\u6570\u636e\u8868\uff0c\u5176\u4e2d\u5b58\u50a8\u4e86\u6587\u7ae0\u76f8\u5173\u6570\u636e\uff0c\u5305\u62ec\u70b9\u51fb\u65f6\u95f4\u3002 \u6b65\u9aa4\u4e09\uff1a\u67e5\u8be2\u6570\u636e \u6267\u884c\u4ee5\u4e0b SQL \u67e5\u8be2\u4ee5\u83b7\u53d6\u7528\u6237\u70b9\u51fb\u65f6\u95f4\uff1a SELECT lastdotime, lastvotenum FROM ecs_article WHERE id = [\u6587\u7ae0ID] \u767b\u5f55\u540e\u590d\u5236 \u5176\u4e2d\uff0c[\u6587\u7ae0ID] \u5e94\u66ff\u6362\u4e3a\u8981\u67e5\u8be2\u7684\u6587\u7ae0\u7684 ID\u3002 \u6b65\u9aa4\u56db\uff1a\u89e3\u91ca\u7ed3\u679c \u67e5\u8be2\u7ed3\u679c\u5c06\u663e\u793a\u4e24\u4e2a\u503c\uff1a lastdotime\uff1a\u4ee5\u65f6\u95f4\u6233\u683c\u5f0f\u663e\u793a\u7528\u6237\u6700\u540e\u4e00\u6b21\u70b9\u51fb\u6587\u7ae0\u7684\u65f6\u95f4\u3002 lastvotenum\uff1a\u4ee5\u65f6\u95f4\u6233\u683c\u5f0f\u663e\u793a\u7528\u6237\u6700\u540e\u4e00\u6b21\u6295\u7968\u6587\u7ae0\u7684\u65f6\u95f4\u3002 \u60a8\u53ef\u4ee5\u5c06\u8fd9\u4e9b\u65f6\u95f4\u6233\u8f6c\u6362\u4e3a\u53ef\u8bfb\u683c\u5f0f\uff0c\u4f8b\u5982\u4f7f\u7528\u4ee5\u4e0b PHP \u4ee3\u7801\uff1a $lastDoTime = strtotime($lastdotime); $lastDoTimeReadable = date(&#8216;Y-m-d H:i:s&#8217;, $lastDoTime); [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18],"tags":[],"class_list":["post-33734","post","type-post","status-publish","format-standard","hentry","category-cms"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/33734","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=33734"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/33734\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=33734"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=33734"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=33734"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}