{"id":2929,"date":"2019-08-31T12:22:26","date_gmt":"2019-08-31T04:22:26","guid":{"rendered":"https:\/\/www.baishitou.cn\/?p=2929"},"modified":"2019-09-04T12:39:09","modified_gmt":"2019-09-04T04:39:09","slug":"%e7%bb%87%e6%a2%a6dedecms%e7%86%8a%e6%8e%8c%e5%8f%b7%e5%91%a8%e7%ba%a7%e6%94%b6%e5%bd%95%e6%8e%a5%e5%8f%a3%e6%8e%a8%e9%80%81","status":"publish","type":"post","link":"https:\/\/www.baishitou.cn\/2929.html","title":{"rendered":"\u7ec7\u68a6DEDECMS\u718a\u638c\u53f7\u5468\u7ea7\u6536\u5f55\u63a5\u53e3\u63a8\u9001"},"content":{"rendered":"

\u7ec7\u68a6DEDECMS\u718a\u638c\u53f7\u5468\u7ea7\u6536\u5f55\u63a5\u53e3\u63a8\u9001,\u901a\u8fc7\u5468\u7ea7\u6536\u5f55\u63a5\u53e3\uff0c\u6bcf\u5929\u53ef\u63d0\u4ea4\u6700\u591a500\u4e07\u6761\u6709\u4ef7\u503c\u7684\u5185\u5bb9\uff0c\u6240\u63d0\u4ea4\u5185\u5bb9\u4f1a\u8fdb\u5165\u767e\u5ea6\u641c\u7d22\u7edf\u4e00\u5904\u7406\u6d41\u7a0b\uff0c\u8fd9\u4e2a\u8fc7\u7a0b\u9700\u8981\u4e00\u6bb5\u65f6\u95f4\uff0c\u8bf7\u8010\u5fc3\u7b49\u5f85\u3002<\/p>\n

\u5148\u770b\u6548\u679c\uff0c\u5982\u679c\u4f60\u9700\u8981\u767e\u5ea6\u4e3b\u52a8\u63a8\u9001\uff0c\u8bf7\u70b9\u51fb\u7ec7\u68a6dedecms5.7\u767e\u5ea6\u4e3b\u52a8\u63a8\u9001(\u5b9e\u65f6)<\/a><\/p>\n

\"\"<\/a><\/p>\n

\u6253\u5f00\u4f60\u7684\u718a\u638c\u53f7\u7ba1\u7406\u540e\u53f0\u3002\u8bb0\u4f4f\u4f60\u7684\u718a\u638c\u53f7\u63a5\u53e3\u8c03\u7528\u5730\u5740<\/p>\n

\"\"<\/a><\/p>\n

\u7b2c\u4e00\u6b65\uff0c\u6253\u5f00\u4f60\u7684\u7f51\u7ad9\u540e\u53f0-\u7cfb\u7edf-\u57fa\u672c\u53c2\u6570\uff0c\u6dfb\u52a0\u65b0\u53d8\u91cf\uff0c\u5982\u4e0b\u56fe\uff0c\u5728\u4f60\u7684\u53d8\u91cf\u503c\u91cc\u9762\u6dfb\u52a0\u718a\u638c\u53f7\u63a5\u53e3\u8c03\u7528\u5730\u5740<\/p>\n

\"\"<\/a><\/p>\n

\u53d8\u91cf\u540d\u79f0\uff1acfg_xiong_push<\/p>\n

\u53d8\u91cf\u503c\uff1a\uff08\u586b\u5199\u60a8\u7684\u718a\u638c\u53f7\u63a5\u53e3\u8c03\u7528\u5730\u5740\uff09<\/p>\n

\u53d8\u91cf\u7c7b\u578b\uff1a\u6587\u672c<\/p>\n

\u53c2\u6570\u8bf4\u660e\uff1a\u718a\u638c\u53f7\u63a8\u9001\u63a5\u53e3<\/p>\n

 <\/p>\n

\u7b2c\u4e8c\u6b65\uff0c\u6253\u5f00 \/dede\/inc\/inc_archives_functions.php \u5728\u6587\u4ef6\u6700\u540e\u63d2\u5165\u4e0b\u9762\u4ee3\u7801\uff1a<\/p>\n

\/**\r\n * \u718a\u638c\u4e3b\u52a8\u63a8\u9001\r\n *\/\r\nfunction xiong_push($id=\"\",$qstr=\"\")\r\n{\r\n\tglobal $cfg_multi_site,$cfg_basehost,$cfg_xiong_push;\r\n\tif(!empty($id) && !empty($cfg_xiong_push))\r\n\t{\r\n\t\tif( !empty($id) && empty($qstr) ) $qstr = $id;\r\n\t\tif($qstr=='')\r\n\t\t{\r\n\t\t\texit();\r\n\t\t}\r\n\t\t$qstrs = explode('`',$qstr);\r\n\t\t$cfg_domain = $cfg_multi_site == 'N' ? $cfg_basehost : '';\r\n\t\t$urls = array();\r\n\t\t$i = 0;\r\n\t\tforeach($qstrs as $aid)\r\n\t\t{\r\n\t\t\t$i++;\r\n\t\t\t$arcrow = GetOneArchive($aid);\r\n\t\t\t$url = $cfg_domain.$arcrow['arcurl'];\r\n\t\t\t$urls[] = $url;\r\n\t\t\t$artlist .= $url.\"<br \/>\";\r\n\t\t}\r\n\t\tif($i>1) $artlist = \"\";\r\n\t\tif(!empty($urls)){\r\n\t\t\t$ch = curl_init();\r\n\t\t\t$options =  array(\r\n\t\t\t\tCURLOPT_URL => trim($cfg_xiong_push),\r\n\t\t\t\tCURLOPT_POST => true,\r\n\t\t\t\tCURLOPT_RETURNTRANSFER => true,\r\n\t\t\t\tCURLOPT_POSTFIELDS => implode(\"\\n\", $urls),\r\n\t\t\t\tCURLOPT_HTTPHEADER => array('Content-Type: text\/plain'),\r\n\t\t\t);\r\n\t\t\tcurl_setopt_array($ch, $options);\r\n\t\t\t$result = curl_exec($ch);\r\n\t\t\tcurl_close($ch);\r\n\t\t\t$result = json_decode($result, true);\r\n\t\t\tif(isset($result['error'])){\r\n\t\t\t\treturn '\u718a\u638c\u4e3b\u52a8\u63a8\u9001\u5931\u8d25\uff0c\u9519\u8bef\u7801\uff1a'.$result['error'].' message\uff1a'.$result['message'];\r\n\t\t\t}else{\r\n\t\t\t\t$not_same_site = isset($result['not_same_site'][0]) ? \" <font style='color:#f00;'>\u63a8\u9001\u94fe\u63a5\u4e0e\u718a\u638c\u7ed1\u5b9a\u7ad9\u70b9\u4e0d\u4e00\u81f4<\/font> \" : \"\";\r\n\t\t\t\t$not_valid = isset($result['not_valid'][0]) ? \" <font style='color:#f00;'>\u63a8\u9001\u94fe\u63a5\u4e0d\u5408\u6cd5<\/font> \" : \"\";\r\n\t\t\t\treturn $not_same_site . $not_valid . '\u718a\u638c\u4e3b\u52a8\u63a8\u9001\u6210\u529f '.$result['success_batch'].' \u6761\uff01\u5f53\u5929\u5269\u4f59 '.$result['remain_batch'].' \u6761\u53ef\u63a8\u9001\uff01'.$artlist;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn \"\u6ca1\u6709\u6570\u636e\u88ab\u63a8\u9001\uff01\";\r\n\t}\r\n}<\/code><\/pre>\n

\u6253\u5f00\/dede\/article_add.php\uff0c\u641c\u7d22<\/p>\n

\/\/\u8fd4\u56de\u6210\u529f\u4fe1\u606f<\/code><\/pre>\n

\u5728\u5b83\u4e0a\u9762\u6dfb\u52a0<\/p>\n

if(!empty($cfg_xiong_push))\r\n{\r\n\t$backurl .= \"<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\".xiong_push($arcID).\"<\/p>\";\r\n}<\/code><\/pre>\n

\u7ee7\u7eed\u641c\u7d22<\/p>\n

line-height:36px;height:36px<\/code><\/pre>\n

\u66ff\u6362\u6210<\/p>\n

line-height:36px;<\/code><\/pre>\n

\u5982\u679c\u5728\u8fd9\u4e4b\u524d\u4f60\u6dfb\u52a0\u8fc7\u767e\u5ea6\u4e3b\u52a8\u63a8\u9001\uff0c\u5220\u9664\u6837\u5f0f\u8fd9\u4e00\u6b65\u53ef\u5ffd\u7565\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

\u7ec7\u68a6DEDECMS\u718a\u638c\u53f7\u5468\u7ea7\u6536\u5f55\u63a5\u53e3\u63a8\u9001,\u901a\u8fc7\u5468\u7ea7\u6536\u5f55\u63a5\u53e3\uff0c\u6bcf\u5929\u53ef\u63d0\u4ea4\u6700\u591a500\u4e07\u6761\u6709\u4ef7\u503c\u7684\u5185\u5bb9\uff0c\u6240\u63d0\u4ea4\u5185\u5bb9\u4f1a […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[43,1023,1024,1025,180],"class_list":["post-2929","post","type-post","status-publish","format-standard","hentry","category-web","tag-dedecms","tag-1023","tag-1024","tag-1025","tag-180"],"_links":{"self":[{"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/posts\/2929","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/comments?post=2929"}],"version-history":[{"count":0,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/posts\/2929\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/media?parent=2929"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/categories?post=2929"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/tags?post=2929"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}