{"id":59247,"date":"2025-04-23T13:07:37","date_gmt":"2025-04-23T05:07:37","guid":{"rendered":"https:\/\/fwq.ai\/blog\/59247\/"},"modified":"2025-04-23T13:07:37","modified_gmt":"2025-04-23T05:07:37","slug":"%e5%a6%82%e4%bd%95%e5%88%a0%e9%99%a4ecshop%e5%90%8e%e5%8f%b0%e6%9b%b4%e6%96%b0%e5%8d%87%e7%ba%a7%e7%ad%89%e6%8f%90%e7%a4%ba","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/59247\/","title":{"rendered":"\u5982\u4f55\u5220\u9664ecshop\u540e\u53f0\u66f4\u65b0\u5347\u7ea7\u7b49\u63d0\u793a"},"content":{"rendered":"<p>\u5982\u4f55\u5220\u9664ecshop\u540e\u53f0\u66f4\u65b0\u5347\u7ea7\u7b49\u63d0\u793a\uff0c\u597d\u6a21\u677f\u63d0\u793a\u8be6\u7ec6\u529e\u6cd5,\u8fd9\u91cc\u4ee5ecshop2.7.2\u4e3a\u4f8b<\/p>\n<p>  \u627e\u5230\u6587\u4ef6admin\/index.php   \u5220\u9664483\u884c\u5230533\u884c\uff0c\u5373\u5220\u9664\u4ee3\u7801\uff1a    elseif ($_REQUEST[&#8216;act&#8217;] == &#8216;main_api&#8217;)   {   &nbsp;&nbsp; &nbsp;require_once(ROOT_PATH . &#8216;\/includes\/lib_base.php&#8217;);   &nbsp;&nbsp; &nbsp;$data = read_static_cache(&#8216;api_str&#8217;);   &nbsp;   &nbsp;&nbsp; &nbsp;if($data === false || API_TIME &lt; date(&#8216;Y-m-d H:i:s&#8217;,time()-43200))   &nbsp;&nbsp; &nbsp;{   &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;include_once(ROOT_PATH . &#8216;includes\/cls_transport.php&#8217;);   &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;$ecs_version = VERSION;   &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;$ecs_lang = $_CFG[&#8216;lang&#8217;];   &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;$ecs_release = RELEASE;   &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;$php_ver = PHP_VERSION;   &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;$mysql_ver = $db-&gt;version();   &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;$order[&#8216;stats&#8217;] = $db-&gt;getRow(&#8216;SELECT COUNT(*) AS oCount, IFNULL(SUM(order_amount), 0) AS oAmount&#8217; .   &nbsp;&nbsp; &nbsp;&#8216; FROM &#8216; .$ecs-&gt;table(&#8216;order_info&#8217;));   &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;$ocount = $order[&#8216;stats&#8217;][&#8216;oCount&#8217;];   &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;$oamount = $order[&#8216;stats&#8217;][&#8216;oAmount&#8217;];   &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;$goods[&#8216;total&#8217;] &nbsp; = $db-&gt;GetOne(&#8216;SELECT COUNT(*) FROM &#8216; .$ecs-&gt;table(&#8216;goods&#8217;).   &nbsp;&nbsp; &nbsp;&#8216; WHERE is_delete = 0 AND is_alone_sale = 1 AND is_real = 1&#8217;);   &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;$gcount = $goods[&#8216;total&#8217;];   &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;$ecs_charset = strtoupper(EC_CHARSET);   &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;$ecs_user = $db-&gt;getOne(&#8216;SELECT COUNT(*) FROM &#8216; . $ecs-&gt;table(&#8216;users&#8217;));   &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;$ecs_template = $db-&gt;getOne(&#8216;SELECT value FROM &#8216; . $ecs-&gt;table(&#8216;shop_config&#8217;) . &#8216; WHERE code = \\&#8217;template\\&#8221;);   &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;$style = $db-&gt;getOne(&#8216;SELECT value FROM &#8216; . $ecs-&gt;table(&#8216;shop_config&#8217;) . &#8216; WHERE code = \\&#8217;stylename\\&#8221;);   &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;if($style == &#8221;)   &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;{   &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$style = &#8216;0&#8217;;   &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;}   &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;$ecs_style = $style;   &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;$shop_url = urlencode($ecs-&gt;url());   &nbsp;   &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;$patch_file = file_get_contents(ROOT_PATH.ADMIN_PATH.&#8221;\/patch_num&#8221;);   &nbsp;   &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;$apiget = &#8220;ver= $ecs_version &amp;lang= $ecs_lang &amp;release= $ecs_release &amp;php_ver= $php_ver &amp;mysql_ver= $mysql_ver &amp;ocount= $ocount &amp;oamount= $oamount &amp;gcount= $gcount &amp;charset= $ecs_charset &amp;usecount= $ecs_user &amp;template= $ecs_template &amp;style= $ecs_style &amp;url= $shop_url &amp;patch= $patch_file &#8220;;   &nbsp;   &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;$t = new transport;   &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;$api_comment = $t-&gt;request(&#8216;http:\/\/api.ecshop.com\/checkver.php&#8217;, $apiget);   &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;$api_str = $api_comment[&#8220;body&#8221;];   &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;echo $api_str;   &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;   &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;$f=ROOT_PATH . &#8216;data\/config.php&#8217;;&nbsp;   &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;file_put_contents($f,str_replace(&#8220;&#8216;API_TIME&#8217;, &#8216;&#8221;.API_TIME.&#8221;&#8216;&#8221;,&#8221;&#8216;API_TIME&#8217;, &#8216;&#8221;.date(&#8216;Y-m-d H:i:s&#8217;,time()).&#8221;&#8216;&#8221;,file_get_contents($f)));   &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;   &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;write_static_cache(&#8216;api_str&#8217;, $api_str);   &nbsp;&nbsp; &nbsp;}   &nbsp;&nbsp; &nbsp;else&nbsp;   &nbsp;&nbsp; &nbsp;{   &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;echo $data;   &nbsp;&nbsp; &nbsp;}   &nbsp;   }    &nbsp;   \u53e6\u5916\u82e5\u6709\u7528\u6237\u5bf9\u540e\u53f0\u63d0\u793a\u672a\u5220\u9664demo,install,upgradet\u63d0\u793a\u7684\u8bdd\uff0c\u76f4\u63a5\u627e\u5230174\u884c&nbsp;   \u5982\uff1a&nbsp;&nbsp; &nbsp;if (file_exists(&#8216;..\/install&#8217;)) &nbsp;\u628a\u8fd9\u91ccinstall \u91cd\u547d\u540d\u5c31\u884c <\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5982\u4f55\u5220\u9664ecshop\u540e\u53f0\u66f4\u65b0\u5347\u7ea7\u7b49\u63d0\u793a\uff0c\u597d\u6a21\u677f\u63d0\u793a\u8be6\u7ec6\u529e\u6cd5,\u8fd9\u91cc\u4ee5ecshop2.7.2\u4e3a\u4f8b \u627e\u5230\u6587\u4ef6admin\/index.php \u5220\u9664483\u884c\u5230533\u884c\uff0c\u5373\u5220\u9664\u4ee3\u7801\uff1a elseif ($_REQUEST[&#8216;act&#8217;] == &#8216;main_api&#8217;) { &nbsp;&nbsp; &nbsp;require_once(ROOT_PATH . &#8216;\/includes\/lib_base.php&#8217;); &nbsp;&nbsp; &nbsp;$data = read_static_cache(&#8216;api_str&#8217;); &nbsp; &nbsp;&nbsp; &nbsp;if($data === false || API_TIME &lt; date(&#8216;Y-m-d H:i:s&#8217;,time()-43200)) &nbsp;&nbsp; &nbsp;{ &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;include_once(ROOT_PATH . &#8216;includes\/cls_transport.php&#8217;); &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;$ecs_version = VERSION; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;$ecs_lang = $_CFG[&#8216;lang&#8217;]; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;$ecs_release = RELEASE; &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":[16],"tags":[],"class_list":["post-59247","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/59247","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=59247"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/59247\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=59247"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=59247"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=59247"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}