{"id":30551,"date":"2024-11-25T12:34:35","date_gmt":"2024-11-25T04:34:35","guid":{"rendered":"https:\/\/fwq.ai\/blog\/30551\/"},"modified":"2024-11-25T12:34:35","modified_gmt":"2024-11-25T04:34:35","slug":"dedecms%e6%80%8e%e4%b9%88%e7%81%b5%e6%b4%bb%e5%ba%94%e7%94%a8%e8%a7%86%e5%9b%be%e7%b1%bb","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/30551\/","title":{"rendered":"DEDECMS\u600e\u4e48\u7075\u6d3b\u5e94\u7528\u89c6\u56fe\u7c7b"},"content":{"rendered":"<p style=\"text-align: center\"><strong><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/000\/020\/5e01700bca602983.jpg\" class=\"aligncenter\" title=\"DEDECMS\u600e\u4e48\u7075\u6d3b\u5e94\u7528\u89c6\u56fe\u7c7b\u63d2\u56fe\" alt=\"DEDECMS\u600e\u4e48\u7075\u6d3b\u5e94\u7528\u89c6\u56fe\u7c7b\u63d2\u56fe\" \/><\/strong><\/p>\n<p><strong>\u600e\u4e48\u7075\u6d3b\u5e94\u7528\u89c6\u56fe\u7c7b\uff1f<\/strong><\/p>\n<p>\u521d\u6b65\u5bf9\u7ec7\u68a6cms\u8fdb\u884c\u4e86\u89e3\uff0c\u5fcd\u4e0d\u4f4f\u8981\u52a8\u624b\u8bd5\u4e00\u8bd5\u4e86\u3002\u7ec7\u68a6cms\u4e5f\u662f\u91c7\u7528mvc\u7684\u8bbe\u8ba1\u6a21\u5f0f\uff0c\u5b83\u7684\u6838\u5fc3\u4ee3\u7801\uff0c\u5927\u90e8\u5206\u5b58\u5728\u4e8einclude\u76ee\u5f55\u91cc\u3002\u5305\u62ec\u63a7\u5236\u5668\u3001 \u6a21\u578b\u3001\u89c6\u56fe\u7c7b\u3001\u6a21\u677f\u5f15\u64ce\u3001\u6807\u7b7e\u5e93\u3001\u516c\u7528\u51fd\u6570\u7b49\u3002<\/p>\n<p>\u63a8\u8350\u5b66\u4e60\uff1a<\/p>\n<p>&nbsp;&nbsp;<\/p>\n<p>&nbsp; &nbsp; &nbsp;\u4e0b\u9762\u6211\u4eec\u5c31\u7b80\u5355\u7684\u521b\u5efa\u4e00\u4e2a\u5c5e\u4e8e\u81ea\u5df1\u7684php\u9875\u9762\u5904\u7406\u6587\u4ef6\uff0c\u5728\u6587\u4ef6\u91cc\uff0c\u7528\u7ec7\u68a6\u81ea\u8eab\u7684\u6a21\u677f\u5f15\u64ce\u548c\u89c6\u56fe\uff0c\u53bb\u89e3\u6790\u6211\u9884\u5148\u521b\u5efa\u597d\u7684\u9759\u6001html\u6587\u4ef6\u3002\u5728\u6b64\uff0c\u6211\u7b80\u5355\u7684\u5199\u4e86\u5982\u4e0b\u51e0\u6bb5\u4ee3\u7801\uff1a<\/p>\n<p>&nbsp; &nbsp; &nbsp;\u7b2c\u4e00\u6b65\uff0c\u521b\u5efa\u81ea\u5df1\u7684php\u9875\u9762\u5904\u7406\u6587\u4ef6\uff0c\u5728\u8fd9\u91cc\uff0c\u6211\u5728\u6839\u76ee\u5f55\u4e0b\u521b\u5efademo.php\u6587\u4ef6\uff0c\u6587\u4ef6\u5185\u5bb9\u5982\u4e0b\uff1a<\/p>\n<p>\u4ee3\u7801\u5982\u4e0b:<\/p>\n<pre>&lt;?php \/*************************************************************************\n* \n* \n* \u8bf4 \u660e\uff1a\u7ec7\u68a6\u89e3\u6790\u6a21\u677f\u4e4b\u7075\u6d3b\u5e94\u7528\u89c6\u56fe\u7c7b\n* \n* \u4f5c \u8005\uff1a\u90d1\u5dde\u5317\u9ca8\n* \n* \u5907 \u6ce8\uff1a\u7ec7\u68a6v5+\u6a21\u677f\u5f15\u64ce\uff0c\u5206\u4e3a\u4e24\u79cd\uff0c\n* 1\u3001\u9759\u6001\u6a21\u677f\u5f15\u64ce(include\/dedetag.class.php) DedeCMS V5.3 \u53ca\u4e4b\u524d\u7248\u672c\u4f7f\u7528\u7684\u4e3b\u8981\u7684\u6a21\u677f\u7c7b\uff0c\u5b83\u662f\u89e3\u6790\u5f0f\u6a21\u677f\u7c7b\uff0c\u5e76\u975e\u7f16\u8bd1\u5f0f\u7684\u3002\n* (\u6ce8\uff1a\u7f16\u8bd1\u5f0f\u662f\u901a\u8fc7\u83b7\u5f97\u6807\u7b7e\u4f4d\u7f6e\u8fdb\u884c\u5185\u5bb9\u66ff\u6362\uff0c\u7f16\u8bd1\u5f0f\u662f\u76f4\u63a5\u89e3\u6790\u4e3a PHP \u4ee3\u7801\uff0c\u4e8c\u6b21\u6267\u884c\u3002)\n* 2\u3001\u52a8\u6001\u6a21\u677f\u5f15\u64ce(include\/dedetemplate.class.php)\n* \u53ef\u4ee5\u6839\u636e\u81ea\u5df1\u7684\u5b9e\u9645\u9700\u6c42\uff0c\u4fee\u6539\u6216\u521b\u5efa\u81ea\u5df1\u7684\u89c6\u56fe\u7c7b\uff0c\u8ba9\u540e\u901a\u8fc7\u7ec7\u68a6\u63d0\u4f9b\u7684\u6a21\u677f\u5f15\u64ce\uff0c\u53bb\u89e3\u6790\u5904\u7406\u5373\u53ef\u3002\n* \n* ***********************************************************************\/\n\/*\u7b2c\u4e00\u6b65&gt;&amp;gt;\u5f15\u5165\u516c\u7528\u914d\u7f6e\uff1a\n*&nbsp;common.inc.php\u4f5c\u7528\uff1a\n*&nbsp;\u8be5\u6587\u4ef6\u91cc\u9762\u8fdb\u884c\u4e86\u7cfb\u7edf\u5168\u5c40\u914d\u7f6e\u3001\u5168\u5c40\u5e38\u7528\u51fd\u6570common.func.php\u3001\n*&nbsp;\u6a21\u5757MVC\u6846\u67b6\u9700\u8981\u7684\u63a7\u5236\u5668\u548c\u6a21\u578b\u57fa\u7c7b(control.class.php,model.class.php)\u3001\u8f7d\u5165\u5c0f\u52a9\u624b\u914d\u7f6e\u3001\n*&nbsp;\u8bbe\u5b9a\u7f13\u5b58\u914d\u7f6e\u4fe1\u606f\u3001\u7279\u6b8a\u5168\u5c40\u53d8\u91cf\u3001\u7cfb\u7edf\u914d\u7f6e\u53c2\u6570\u3001\u6570\u636e\u5e93\u914d\u7f6e\u6587\u4ef6(data\/common.inc.php)\u3001\u8f7d\u5165\u7cfb\u7edf\u9a8c\u8bc1\u5b89\u5168\u914d\u7f6e\u3001\n*&nbsp;Session\u8de8\u57df\u8bbe\u7f6e\u3001$cfg_\u76f8\u5173\u7684\u53c2\u6570\u914d\u7f6e\u4fe1\u606f\u7b49\u8fd9\u4e9b\u6a21\u5757\u529f\u80fd\u7684\u914d\u7f6e\u3002\n*&nbsp;\n*&nbsp;\n*&nbsp;*\/\nrequire&nbsp;'include\/common.inc.php';\n\/\/\u7b2c\u4e8c\u6b65&amp;gt;&amp;gt;\u5f15\u5165\u89c6\u56fe\u7c7b\nrequire&nbsp;'include\/arc.partview.class.php';\n\/\/\u7b2c\u4e09\u6b65&amp;gt;&amp;gt;\u5b9e\u4f8b\u5316\u89c6\u56fe\u5bf9\u8c61\n$pv=new&nbsp;PartView();\n\/\/\u7b2c\u56db\u6b65&amp;gt;&amp;gt;\u8bbe\u7f6e\u89c6\u56fe\u6a21\u677f\n$pv-&amp;gt;SetTemplet(\"demo.html\");\n\/\/\u6700\u540e&amp;gt;\u663e\u793a\u89c6\u56fe\n$pv-&amp;gt;Display();\n?&amp;gt;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u7b2c\u4e8c\u6b65\uff0c\u521b\u5efa\u6a21\u677f\u9875\u9762\u3002<\/p>\n<p>&nbsp; &nbsp; &nbsp;\u61d2\u4eba\u7701\u4e8b\uff0c\u540c\u6837\u7684\u6211\u5728\u6839\u76ee\u5f55\u4e0b\u521b\u5efa\u4e86demo.html\u6587\u4ef6\uff0c\u5185\u5bb9\u5982\u4e0b\uff1a<\/p>\n<p>\u4ee3\u7801\u5982\u4e0b:<\/p>\n<pre>nbsp;HTML&nbsp;PUBLIC&nbsp;\"-\/\/W3C\/\/DTD&nbsp;HTML&nbsp;4.01&nbsp;Transitional\/\/EN\"&amp;gt;\n\n\n&lt;meta&gt;&lt;title&gt;demo\u6d4b\u8bd5\u89c6\u56fe&lt;\/title&gt;&lt;style&gt;\nbody{font-size:12px;}\nul li{float:left; list-style:none;padding:2px 10px;}\nul li a{ }\n#arclist li{ clear:both;float:none;}\n&lt;\/style&gt;&lt;!-- channel_type\u6807\u7b7e\u6d4b\u8bd5 --&gt;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<ul>\n  {dede:channel&nbsp;type=&#8217;top&#8217;&nbsp;row=&#8217;10&#8217;&nbsp;currentstyle=&#8221; <\/p>\n<li><\/li>\n<p>&#8220;} <\/p>\n<li><\/li>\n<p> {\/dede:channel} <\/p>\n<ul>\n   {dede:arclist&nbsp;row=&#8221;10&#8243;} <\/p>\n<li>[field:title\/]<\/li>\n<p> {\/dede:arclist}\n <\/ul>\n<\/ul>\n<p>\u5728demo.html\u6587\u4ef6\u4e2d\uff0c\u6211\u4ee5{dede:channel}\u548c{dede:arclist}\u8fd9\u4e24\u4e2a\u6807\u7b7e\u6765\u6d4b\u8bd5\u7a0b\u5e8f\uff0c\u8fd0\u884c\u7ed3\u679c\u5982\u4e0b\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/image\/629\/108\/254\/1577152353978883.png\" class=\"aligncenter\" title=\"DEDECMS\u600e\u4e48\u7075\u6d3b\u5e94\u7528\u89c6\u56fe\u7c7b\u63d2\u56fe1\" alt=\"DEDECMS\u600e\u4e48\u7075\u6d3b\u5e94\u7528\u89c6\u56fe\u7c7b\u63d2\u56fe1\" \/><\/p>\n<p>\u8fd9\u6837\uff0c\u6240\u8c03\u4fe1\u606f\uff0c\u90fd\u5448\u73b0\u51fa\u6765\u4e86\u3002&nbsp;<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662fDEDECMS\u600e\u4e48\u7075\u6d3b\u5e94\u7528\u89c6\u56fe\u7c7b\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>\u600e\u4e48\u7075\u6d3b\u5e94\u7528\u89c6\u56fe\u7c7b\uff1f \u521d\u6b65\u5bf9\u7ec7\u68a6cms\u8fdb\u884c\u4e86\u89e3\uff0c\u5fcd\u4e0d\u4f4f\u8981\u52a8\u624b\u8bd5\u4e00\u8bd5\u4e86\u3002\u7ec7\u68a6cms\u4e5f\u662f\u91c7\u7528mvc\u7684\u8bbe\u8ba1\u6a21\u5f0f\uff0c\u5b83\u7684\u6838\u5fc3\u4ee3\u7801\uff0c\u5927\u90e8\u5206\u5b58\u5728\u4e8einclude\u76ee\u5f55\u91cc\u3002\u5305\u62ec\u63a7\u5236\u5668\u3001 \u6a21\u578b\u3001\u89c6\u56fe\u7c7b\u3001\u6a21\u677f\u5f15\u64ce\u3001\u6807\u7b7e\u5e93\u3001\u516c\u7528\u51fd\u6570\u7b49\u3002 \u63a8\u8350\u5b66\u4e60\uff1a &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;\u4e0b\u9762\u6211\u4eec\u5c31\u7b80\u5355\u7684\u521b\u5efa\u4e00\u4e2a\u5c5e\u4e8e\u81ea\u5df1\u7684php\u9875\u9762\u5904\u7406\u6587\u4ef6\uff0c\u5728\u6587\u4ef6\u91cc\uff0c\u7528\u7ec7\u68a6\u81ea\u8eab\u7684\u6a21\u677f\u5f15\u64ce\u548c\u89c6\u56fe\uff0c\u53bb\u89e3\u6790\u6211\u9884\u5148\u521b\u5efa\u597d\u7684\u9759\u6001html\u6587\u4ef6\u3002\u5728\u6b64\uff0c\u6211\u7b80\u5355\u7684\u5199\u4e86\u5982\u4e0b\u51e0\u6bb5\u4ee3\u7801\uff1a &nbsp; &nbsp; &nbsp;\u7b2c\u4e00\u6b65\uff0c\u521b\u5efa\u81ea\u5df1\u7684php\u9875\u9762\u5904\u7406\u6587\u4ef6\uff0c\u5728\u8fd9\u91cc\uff0c\u6211\u5728\u6839\u76ee\u5f55\u4e0b\u521b\u5efademo.php\u6587\u4ef6\uff0c\u6587\u4ef6\u5185\u5bb9\u5982\u4e0b\uff1a \u4ee3\u7801\u5982\u4e0b: &lt;?php \/************************************************************************* * * * \u8bf4 \u660e\uff1a\u7ec7\u68a6\u89e3\u6790\u6a21\u677f\u4e4b\u7075\u6d3b\u5e94\u7528\u89c6\u56fe\u7c7b * * \u4f5c \u8005\uff1a\u90d1\u5dde\u5317\u9ca8 * * \u5907 \u6ce8\uff1a\u7ec7\u68a6v5+\u6a21\u677f\u5f15\u64ce\uff0c\u5206\u4e3a\u4e24\u79cd\uff0c * 1\u3001\u9759\u6001\u6a21\u677f\u5f15\u64ce(include\/dedetag.class.php) DedeCMS V5.3 \u53ca\u4e4b\u524d\u7248\u672c\u4f7f\u7528\u7684\u4e3b\u8981\u7684\u6a21\u677f\u7c7b\uff0c\u5b83\u662f\u89e3\u6790\u5f0f\u6a21\u677f\u7c7b\uff0c\u5e76\u975e\u7f16\u8bd1\u5f0f\u7684\u3002 * (\u6ce8\uff1a\u7f16\u8bd1\u5f0f\u662f\u901a\u8fc7\u83b7\u5f97\u6807\u7b7e\u4f4d\u7f6e\u8fdb\u884c\u5185\u5bb9\u66ff\u6362\uff0c\u7f16\u8bd1\u5f0f\u662f\u76f4\u63a5\u89e3\u6790\u4e3a PHP \u4ee3\u7801\uff0c\u4e8c\u6b21\u6267\u884c\u3002) * 2\u3001\u52a8\u6001\u6a21\u677f\u5f15\u64ce(include\/dedetemplate.class.php) * \u53ef\u4ee5\u6839\u636e\u81ea\u5df1\u7684\u5b9e\u9645\u9700\u6c42\uff0c\u4fee\u6539\u6216\u521b\u5efa\u81ea\u5df1\u7684\u89c6\u56fe\u7c7b\uff0c\u8ba9\u540e\u901a\u8fc7\u7ec7\u68a6\u63d0\u4f9b\u7684\u6a21\u677f\u5f15\u64ce\uff0c\u53bb\u89e3\u6790\u5904\u7406\u5373\u53ef\u3002 * * ***********************************************************************\/ \/*\u7b2c\u4e00\u6b65&gt;&amp;gt;\u5f15\u5165\u516c\u7528\u914d\u7f6e\uff1a *&nbsp;common.inc.php\u4f5c\u7528\uff1a *&nbsp;\u8be5\u6587\u4ef6\u91cc\u9762\u8fdb\u884c\u4e86\u7cfb\u7edf\u5168\u5c40\u914d\u7f6e\u3001\u5168\u5c40\u5e38\u7528\u51fd\u6570common.func.php\u3001 *&nbsp;\u6a21\u5757MVC\u6846\u67b6\u9700\u8981\u7684\u63a7\u5236\u5668\u548c\u6a21\u578b\u57fa\u7c7b(control.class.php,model.class.php)\u3001\u8f7d\u5165\u5c0f\u52a9\u624b\u914d\u7f6e\u3001 *&nbsp;\u8bbe\u5b9a\u7f13\u5b58\u914d\u7f6e\u4fe1\u606f\u3001\u7279\u6b8a\u5168\u5c40\u53d8\u91cf\u3001\u7cfb\u7edf\u914d\u7f6e\u53c2\u6570\u3001\u6570\u636e\u5e93\u914d\u7f6e\u6587\u4ef6(data\/common.inc.php)\u3001\u8f7d\u5165\u7cfb\u7edf\u9a8c\u8bc1\u5b89\u5168\u914d\u7f6e\u3001 *&nbsp;Session\u8de8\u57df\u8bbe\u7f6e\u3001$cfg_\u76f8\u5173\u7684\u53c2\u6570\u914d\u7f6e\u4fe1\u606f\u7b49\u8fd9\u4e9b\u6a21\u5757\u529f\u80fd\u7684\u914d\u7f6e\u3002 *&nbsp; *&nbsp; *&nbsp;*\/ require&nbsp;&#8216;include\/common.inc.php&#8217;; \/\/\u7b2c\u4e8c\u6b65&amp;gt;&amp;gt;\u5f15\u5165\u89c6\u56fe\u7c7b require&nbsp;&#8216;include\/arc.partview.class.php&#8217;; [&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-30551","post","type-post","status-publish","format-standard","hentry","category-cms"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/30551","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=30551"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/30551\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=30551"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=30551"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=30551"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}