{"id":30171,"date":"2024-11-25T10:06:43","date_gmt":"2024-11-25T02:06:43","guid":{"rendered":"https:\/\/fwq.ai\/blog\/30171\/"},"modified":"2024-11-25T10:06:43","modified_gmt":"2024-11-25T02:06:43","slug":"%e7%bb%87%e6%a2%a6dedecms%e5%a6%82%e4%bd%95%e8%87%aa%e5%8a%a8%e6%9b%b4%e6%96%b0%e9%a6%96%e9%a1%b5","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/30171\/","title":{"rendered":"\u7ec7\u68a6DEDECMS\u5982\u4f55\u81ea\u52a8\u66f4\u65b0\u9996\u9875"},"content":{"rendered":"<p style=\"text-align: center\"><strong><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/000\/020\/5deef5a8e6606516.jpg\" class=\"aligncenter\" title=\"\u7ec7\u68a6DEDECMS\u5982\u4f55\u81ea\u52a8\u66f4\u65b0\u9996\u9875\u63d2\u56fe\" alt=\"\u7ec7\u68a6DEDECMS\u5982\u4f55\u81ea\u52a8\u66f4\u65b0\u9996\u9875\u63d2\u56fe\" \/><\/strong><\/p>\n<p><strong>\u7ec7\u68a6\u5982\u4f55\u81ea\u52a8\u66f4\u65b0\u9996\u9875\uff1f<\/strong><\/p>\n<p>\u5927\u5bb6\u597d\uff0c\u672c\u4eba\u73a9DEDECMS\u65f6\u95f4\u4e0d\u957f\uff0c \u624d2\u4e2a\u591a\u6708\uff0cDEDECMS\u7a0b\u5e8f\u73b0\u5728\u4f7f\u7528\u7684\u4eba\u5f88\u591a\u3002\u56e0\u4e3a\u5f88\u597d\u7528\u5f88\u65b9\u4fbf\uff0c\u5373\u4f7f\u662f\u65b0\u624b\u4e5f\u80fd\u5feb\u901f\u4f7f\u7528DEDECMS\u5efa\u7ad9\uff0c\u4e0b\u9762\u6211\u5c31\u4e3a\u544a\u8bc9\u5927\u5bb6\u7ec7\u68a6\u5b9a\u65f6\u81ea\u52a8\u66f4\u65b0\u9996\u9875\u7684\u65b9\u6cd5\u3002<\/p>\n<p>\u63a8\u8350\u5b66\u4e60\uff1a<\/p>\n<p>\u5982\u679c\u7f51\u7ad9\u4e3b\u9875\u4f7f\u7528\u4e86\u652f\u6301\u968f\u673a\u8c03\u7528\u6587\u7ae0\u7684CMS\uff0c\u5982\uff1adedecms\uff0c\u5185\u5bb9\u53c8\u662f\u91c7\u96c6\u7684\uff0c\u5e76\u4e14\u4f60\u6ca1\u591a\u5c11\u65f6\u95f4\u8fdb\u884c\u624b\u52a8\u66f4\u65b0\u5185\u5bb9\u7684\u8bdd\uff0c\u4f46\u53c8\u60f3\u8ba9\u767e\u5ea6\u559c\u6b22\u4f60\u7684\u7f51\u7ad9\uff0c\u7528\u8fd9\u4e2a\u5c0f\u7a0b\u5e8f\u5c06\u4f1a\u5bf9\u4f60\u76f8\u5f53\u7684\u6709\u7528\u548c\u65b9\u4fbf\u3002<\/p>\n<p>\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<pre>&lt;?php set_time_limit(0);\n\/\/\u4f60\u7f51\u7ad9\u7684CMS\u6839\u7f51\u5740\uff0c\u7ed3\u675f\u4e0d\u8981\u52a0 \/\n$baseCmsUrl = \"http:\/\/www.examx.cn\";\n\/\/\u52a8\u6001\u4e3b\u9875\u7684\u540d\u79f0\n$dmPageName = \"index.php\";\n\/\/\u9759\u6001\u4e3b\u9875\u7684\u540d\u79f0\n$stPageName = \"index.html\";\n\/\/\u4f60\u5e0c\u671b\u591a\u957f\u65f6\u95f4\u66f4\u65b0\u4e00\u6b21\uff0c\u5355\u4f4d\u662f\u79d2\n$mkTime = 3600;\n\/\/\u4e0b\u9762\u662f\u6267\u884c\u7684\u4ee3\u7801\n$tureStFile = dirname(__FILE__).&#039;\/&#039;.$stPageName;\n$ftime = @filemtime($tureStFile);\nif(!file_exists($tureStFile) || ($ftime &lt; time()-$mkTime))\n{\n$body = file_get_contents($baseCmsUrl.&#039;\/&#039;.$dmPageName);\n$fp = fopen($tureStFile, &#039;w&#039;);\nfwrite($fp, $body);\nfclose($fp);\n}\n?&gt;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u5c06\u4e0a\u8ff0\u4ee3\u7801\u4fdd\u5b58\u4e3a task.php&nbsp;<\/p>\n<p>\u7136\u540e\u5728\u4e3b\u9875\u7684\u9759\u6001HTML\u7ed3\u5c3e\u5f15\u5165\u4e0b\u9762\u7684JS<\/p>\n<pre>&lt;script&gt;&lt;\/script&gt;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u4ee5\u4e0a\u4ee3\u7801\u5728dedecms\u548cphpcms\u4e2d\u5747\u53ef\u7528\uff0cecms\u53ef\u80fd\u662f\u4e0d\u884c\u7684\uff0c\u4e0d\u8fc7\u5b83\u4f3c\u4e4e\u6709\u8ba1\u5212\u4efb\u52a1\u529f\u80fd\uff0c\u4f46\u6ca1\u6709\u968f\u673a\u8c03\u7528\u7684\u529f\u80fd\u7528\u8fd9\u4e2a\u4e5f\u6ca1\u7528\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u7ec7\u68a6DEDECMS\u5982\u4f55\u81ea\u52a8\u66f4\u65b0\u9996\u9875\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>\u7ec7\u68a6\u5982\u4f55\u81ea\u52a8\u66f4\u65b0\u9996\u9875\uff1f \u5927\u5bb6\u597d\uff0c\u672c\u4eba\u73a9DEDECMS\u65f6\u95f4\u4e0d\u957f\uff0c \u624d2\u4e2a\u591a\u6708\uff0cDEDECMS\u7a0b\u5e8f\u73b0\u5728\u4f7f\u7528\u7684\u4eba\u5f88\u591a\u3002\u56e0\u4e3a\u5f88\u597d\u7528\u5f88\u65b9\u4fbf\uff0c\u5373\u4f7f\u662f\u65b0\u624b\u4e5f\u80fd\u5feb\u901f\u4f7f\u7528DEDECMS\u5efa\u7ad9\uff0c\u4e0b\u9762\u6211\u5c31\u4e3a\u544a\u8bc9\u5927\u5bb6\u7ec7\u68a6\u5b9a\u65f6\u81ea\u52a8\u66f4\u65b0\u9996\u9875\u7684\u65b9\u6cd5\u3002 \u63a8\u8350\u5b66\u4e60\uff1a \u5982\u679c\u7f51\u7ad9\u4e3b\u9875\u4f7f\u7528\u4e86\u652f\u6301\u968f\u673a\u8c03\u7528\u6587\u7ae0\u7684CMS\uff0c\u5982\uff1adedecms\uff0c\u5185\u5bb9\u53c8\u662f\u91c7\u96c6\u7684\uff0c\u5e76\u4e14\u4f60\u6ca1\u591a\u5c11\u65f6\u95f4\u8fdb\u884c\u624b\u52a8\u66f4\u65b0\u5185\u5bb9\u7684\u8bdd\uff0c\u4f46\u53c8\u60f3\u8ba9\u767e\u5ea6\u559c\u6b22\u4f60\u7684\u7f51\u7ad9\uff0c\u7528\u8fd9\u4e2a\u5c0f\u7a0b\u5e8f\u5c06\u4f1a\u5bf9\u4f60\u76f8\u5f53\u7684\u6709\u7528\u548c\u65b9\u4fbf\u3002 \u4ee3\u7801\u5982\u4e0b\uff1a &lt;?php set_time_limit(0); \/\/\u4f60\u7f51\u7ad9\u7684CMS\u6839\u7f51\u5740\uff0c\u7ed3\u675f\u4e0d\u8981\u52a0 \/ $baseCmsUrl = &#8220;http:\/\/www.examx.cn&#8221;; \/\/\u52a8\u6001\u4e3b\u9875\u7684\u540d\u79f0 $dmPageName = &#8220;index.php&#8221;; \/\/\u9759\u6001\u4e3b\u9875\u7684\u540d\u79f0 $stPageName = &#8220;index.html&#8221;; \/\/\u4f60\u5e0c\u671b\u591a\u957f\u65f6\u95f4\u66f4\u65b0\u4e00\u6b21\uff0c\u5355\u4f4d\u662f\u79d2 $mkTime = 3600; \/\/\u4e0b\u9762\u662f\u6267\u884c\u7684\u4ee3\u7801 $tureStFile = dirname(__FILE__).&#039;\/&#039;.$stPageName; $ftime = @filemtime($tureStFile); if(!file_exists($tureStFile) || ($ftime &lt; time()-$mkTime)) { $body = file_get_contents($baseCmsUrl.&#039;\/&#039;.$dmPageName); $fp = fopen($tureStFile, &#039;w&#039;); fwrite($fp, $body); fclose($fp); } ?&gt; \u767b\u5f55\u540e\u590d\u5236 \u5c06\u4e0a\u8ff0\u4ee3\u7801\u4fdd\u5b58\u4e3a task.php&nbsp; \u7136\u540e\u5728\u4e3b\u9875\u7684\u9759\u6001HTML\u7ed3\u5c3e\u5f15\u5165\u4e0b\u9762\u7684JS &lt;script&gt;&lt;\/script&gt; [&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-30171","post","type-post","status-publish","format-standard","hentry","category-cms"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/30171","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=30171"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/30171\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=30171"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=30171"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=30171"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}