{"id":30109,"date":"2024-11-25T11:31:07","date_gmt":"2024-11-25T03:31:07","guid":{"rendered":"https:\/\/fwq.ai\/blog\/30109\/"},"modified":"2024-11-25T11:31:07","modified_gmt":"2024-11-25T03:31:07","slug":"%e5%a6%82%e4%bd%95%e8%ae%a9dedecms%e5%ae%9e%e7%8e%b0shtml","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/30109\/","title":{"rendered":"\u5982\u4f55\u8ba9dedecms\u5b9e\u73b0shtml"},"content":{"rendered":"<p style=\"text-align: center\"><strong><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/000\/020\/5deb1359ed982339.jpg\" class=\"aligncenter\" title=\"\u5982\u4f55\u8ba9dedecms\u5b9e\u73b0shtml\u63d2\u56fe\" alt=\"\u5982\u4f55\u8ba9dedecms\u5b9e\u73b0shtml\u63d2\u56fe\" \/><\/strong><\/p>\n<p><strong>\u5982\u4f55\u8ba9\u5b9e\u73b0shtml\uff1f<\/strong><\/p>\n<p>\u8ba9dedecms\u5b9e\u73b0shtml\u5305\u542b\uff0c\u8fd9\u4e2a\u662f\u5341\u5206\u7b80\u5355\uff0c\u4e5f\u662f\u5341\u5206\u8f7b\u677e\u7684\u4e00\u4e2a\u95ee\u9898\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u5bf9dedecms\u7684\u4e8c\u6b21\u5f00\u53d1\uff0c\u5b9e\u73b0\u5bf9dedecms\u9876\u90e8\u5bfc\u822a\uff0c\u4e2d\u95f4\u90e8\u5206\uff0c\u53f3\u8fb9\u516c\u5171\u90e8\u5206\uff0c\u4ee5\u53ca\u5e95\u90e8<\/p>\n<p>&nbsp;&nbsp;<\/p>\n<p>\u63a8\u8350\u5b66\u4e60\uff1a<\/p>\n<p>\u8ba9dedecms\u5b9e\u73b0shtml\u5305\u542b\uff0c\u8fd9\u4e2a\u662f\u5341\u5206\u7b80\u5355\uff0c\u4e5f\u662f\u5341\u5206\u8f7b\u677e\u7684\u4e00\u4e2a\u95ee\u9898\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u5bf9dedecms\u7684\u4e8c\u6b21\u5f00\u53d1\uff0c\u5b9e\u73b0\u5bf9dedecms\u9876\u90e8\u5bfc\u822a\uff0c\u4e2d\u95f4\u90e8\u5206\uff0c\u53f3\u8fb9\u516c\u5171\u90e8\u5206\uff0c\u4ee5\u53ca\u5e95\u90e8\uff0c\u90fd\u6709\u4e00\u4e2a\u5f88\u597d\u7684\u652f\u6301\uff0c\u4ece\u800c\u51cf\u5c11html\u751f\u6210\u7684\u65f6\u5019\u9891\u7e41\u7684\u6d88\u8017\u7cfb\u7edf\u8d44\u6e90\u53bb\u751f\u6210dedecms\u7684html\u529f\u80fd\u3002\u8fd9\u6837\u53ef\u4ee5\u52a0\u5febdedecms\u751f\u6210html\u7684\u901f\u5ea6\u3002<\/p>\n<p><span>\u7acb\u5373\u5b66\u4e60<\/span>\u201c\u201d\uff1b<\/p>\n<p>&nbsp; &nbsp; &nbsp;\u9996\u5148\u6211\u4eec\u8981\u5b9e\u73b0\u4e00\u4e2a\u5bf9dedecms\u680f\u76ee\u53f3\u8fb9\u5b9e\u73b0shtml\u5305\u542b\u3002\u6709\u5173dedecms\u914d\u7f6eshtml\u73af\u5883\uff0c\u4e0a\u7bc7\u6587\u7ae0\u90fd\u8bb2\u8ff0\u8fc7\u4e86\u3002<\/p>\n<p>&nbsp; &nbsp; &nbsp;1:\u9996\u5148\u5efa\u7acb\u53f3\u8fb9\u516c\u5171\u6a21\u677ftemplates\/default\/right.htm<\/p>\n<p>&nbsp; &nbsp; &nbsp;2:\u7f16\u5199\u4ee5\u4e0b\u6807\u7b7e<\/p>\n<p>\u4ee3\u7801\u5982\u4e0b:<\/p>\n<pre>function&nbsp;lib_shtml(&amp;amp;$ctag,&amp;amp;$refObj)\n{\nif(isset($_GET['tid'])){\nreturn&nbsp;file_get_contents('..\/data\/'.$refObj-&amp;gt;Fields['id'].'right.htm');\n}else{\nreturn&nbsp;'&lt;!--#include virtual=\"&#039;.$GLOBALS[&#039;cfg_cmspath&#039;].&#039;\/data\/&#039;.$refObj-&gt;Fields[&#039;id&#039;].&#039;right.htm\"--&gt;';\n}\n}<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>&nbsp; &nbsp; 3:\u751f\u6210\u680f\u76ee\u7684\u65f6\u5019\uff0c\u751f\u6210\u5bf9\u5e94\u680f\u76ee\u7684\u53f3\u8fb9\u3002<\/p>\n<pre>&nbsp;&nbsp;&nbsp;arc.listview.class.php<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u4ee3\u7801\u5982\u4e0b:<\/p>\n<pre>var&nbsp;$tcp1;\nvar&nbsp;$tcp3;&nbsp;&lt;p&gt;&nbsp;$this-&amp;gt;tcp1&nbsp;=&nbsp;new&nbsp;DedeTagParse();\n$this-&amp;gt;tcp1-&amp;gt;SetRefObj($this);\n$this-&amp;gt;tcp1-&amp;gt;SetNameSpace(\"dede\",&nbsp;\"{\",&nbsp;\"}\");&lt;\/p&gt;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>&nbsp; &nbsp; &nbsp;\u52a0\u8f7dright.htm\u6a21\u677f<\/p>\n<pre>&nbsp;&nbsp;$this-&amp;gt;tcp1-&amp;gt;LoadTemplate($GLOBALS['cfg_basedir'].$GLOBALS['cfg_templets_dir'].\"\/\".$GLOBALS['cfg_df_style'].\"\/right.htm\");<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>&nbsp; &nbsp; \u751f\u6210html<\/p>\n<pre>&nbsp;&nbsp;&nbsp;$file&nbsp;=&nbsp;$this-&amp;gt;Fields['id'].'right.htm';\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$rightfile&nbsp;=&nbsp;$GLOBALS['cfg_basedir'].$GLOBALS['cfg_cmspath'].\"\/data\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this-&amp;gt;tcp1,$this);<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>&nbsp; 4:\u6a21\u677f\u4e2d\u76f4\u63a5\u8c03\u7528{dede:shtml\/}<\/p>\n<p>&nbsp; &nbsp;\u540e\u53f0\u751f\u6210\uff0c\u5c31\u5b8c\u6210\u4e86\u8ba9dedecms\u5b9e\u73b0shtml\u5305\u542b.<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u8ba9\u5b9e\u73b0shtml\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>\u5982\u4f55\u8ba9\u5b9e\u73b0shtml\uff1f \u8ba9dedecms\u5b9e\u73b0shtml\u5305\u542b\uff0c\u8fd9\u4e2a\u662f\u5341\u5206\u7b80\u5355\uff0c\u4e5f\u662f\u5341\u5206\u8f7b\u677e\u7684\u4e00\u4e2a\u95ee\u9898\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u5bf9dedecms\u7684\u4e8c\u6b21\u5f00\u53d1\uff0c\u5b9e\u73b0\u5bf9dedecms\u9876\u90e8\u5bfc\u822a\uff0c\u4e2d\u95f4\u90e8\u5206\uff0c\u53f3\u8fb9\u516c\u5171\u90e8\u5206\uff0c\u4ee5\u53ca\u5e95\u90e8 &nbsp;&nbsp; \u63a8\u8350\u5b66\u4e60\uff1a \u8ba9dedecms\u5b9e\u73b0shtml\u5305\u542b\uff0c\u8fd9\u4e2a\u662f\u5341\u5206\u7b80\u5355\uff0c\u4e5f\u662f\u5341\u5206\u8f7b\u677e\u7684\u4e00\u4e2a\u95ee\u9898\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u5bf9dedecms\u7684\u4e8c\u6b21\u5f00\u53d1\uff0c\u5b9e\u73b0\u5bf9dedecms\u9876\u90e8\u5bfc\u822a\uff0c\u4e2d\u95f4\u90e8\u5206\uff0c\u53f3\u8fb9\u516c\u5171\u90e8\u5206\uff0c\u4ee5\u53ca\u5e95\u90e8\uff0c\u90fd\u6709\u4e00\u4e2a\u5f88\u597d\u7684\u652f\u6301\uff0c\u4ece\u800c\u51cf\u5c11html\u751f\u6210\u7684\u65f6\u5019\u9891\u7e41\u7684\u6d88\u8017\u7cfb\u7edf\u8d44\u6e90\u53bb\u751f\u6210dedecms\u7684html\u529f\u80fd\u3002\u8fd9\u6837\u53ef\u4ee5\u52a0\u5febdedecms\u751f\u6210html\u7684\u901f\u5ea6\u3002 \u7acb\u5373\u5b66\u4e60\u201c\u201d\uff1b &nbsp; &nbsp; &nbsp;\u9996\u5148\u6211\u4eec\u8981\u5b9e\u73b0\u4e00\u4e2a\u5bf9dedecms\u680f\u76ee\u53f3\u8fb9\u5b9e\u73b0shtml\u5305\u542b\u3002\u6709\u5173dedecms\u914d\u7f6eshtml\u73af\u5883\uff0c\u4e0a\u7bc7\u6587\u7ae0\u90fd\u8bb2\u8ff0\u8fc7\u4e86\u3002 &nbsp; &nbsp; &nbsp;1:\u9996\u5148\u5efa\u7acb\u53f3\u8fb9\u516c\u5171\u6a21\u677ftemplates\/default\/right.htm &nbsp; &nbsp; &nbsp;2:\u7f16\u5199\u4ee5\u4e0b\u6807\u7b7e \u4ee3\u7801\u5982\u4e0b: function&nbsp;lib_shtml(&amp;amp;$ctag,&amp;amp;$refObj) { if(isset($_GET[&#8216;tid&#8217;])){ return&nbsp;file_get_contents(&#8216;..\/data\/&#8217;.$refObj-&amp;gt;Fields[&#8216;id&#8217;].&#8217;right.htm&#8217;); }else{ return&nbsp;&#8216;&lt;!&#8211;#include virtual=&#8221;&#039;.$GLOBALS[&#039;cfg_cmspath&#039;].&#039;\/data\/&#039;.$refObj-&gt;Fields[&#039;id&#039;].&#039;right.htm&#8221;&#8211;&gt;&#8217;; } } \u767b\u5f55\u540e\u590d\u5236 &nbsp; &nbsp; 3:\u751f\u6210\u680f\u76ee\u7684\u65f6\u5019\uff0c\u751f\u6210\u5bf9\u5e94\u680f\u76ee\u7684\u53f3\u8fb9\u3002 &nbsp;&nbsp;&nbsp;arc.listview.class.php \u767b\u5f55\u540e\u590d\u5236 \u4ee3\u7801\u5982\u4e0b: var&nbsp;$tcp1; var&nbsp;$tcp3;&nbsp;&lt;p&gt;&nbsp;$this-&amp;gt;tcp1&nbsp;=&nbsp;new&nbsp;DedeTagParse(); $this-&amp;gt;tcp1-&amp;gt;SetRefObj($this); $this-&amp;gt;tcp1-&amp;gt;SetNameSpace(&#8220;dede&#8221;,&nbsp;&#8220;{&#8220;,&nbsp;&#8220;}&#8221;);&lt;\/p&gt; \u767b\u5f55\u540e\u590d\u5236 &nbsp; &nbsp; &nbsp;\u52a0\u8f7dright.htm\u6a21\u677f &nbsp;&nbsp;$this-&amp;gt;tcp1-&amp;gt;LoadTemplate($GLOBALS[&#8216;cfg_basedir&#8217;].$GLOBALS[&#8216;cfg_templets_dir&#8217;].&#8221;\/&#8221;.$GLOBALS[&#8216;cfg_df_style&#8217;].&#8221;\/right.htm&#8221;); \u767b\u5f55\u540e\u590d\u5236 &nbsp; &nbsp; \u751f\u6210html &nbsp;&nbsp;&nbsp;$file&nbsp;=&nbsp;$this-&amp;gt;Fields[&#8216;id&#8217;].&#8217;right.htm&#8217;; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$rightfile&nbsp;=&nbsp;$GLOBALS[&#8216;cfg_basedir&#8217;].$GLOBALS[&#8216;cfg_cmspath&#8217;].&#8221;\/data\/&#8221;.$file; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(!file_exists($rightfile)){ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$this-&amp;gt;tcp1-&amp;gt;SaveTo($rightfile); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}else{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if((time()-filectime($rightfile))&amp;gt;3600){ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$this-&amp;gt;tcp1-&amp;gt;SaveTo($rightfile); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} [&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-30109","post","type-post","status-publish","format-standard","hentry","category-cms"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/30109","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=30109"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/30109\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=30109"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=30109"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=30109"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}