{"id":198987,"date":"2025-05-03T13:38:09","date_gmt":"2025-05-03T05:38:09","guid":{"rendered":"https:\/\/server.hk\/cnblog\/198987\/"},"modified":"2025-05-03T13:38:09","modified_gmt":"2025-05-03T05:38:09","slug":"ecshop%e5%90%af%e7%94%a8gzip%e5%90%8e%e5%90%8e%e5%8f%b0%e4%b8%8d%e8%83%bd%e8%ae%bf%e9%97%ae","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/198987\/","title":{"rendered":"ecshop\u542f\u7528gzip\u540e\u540e\u53f0\u4e0d\u80fd\u8bbf\u95ee"},"content":{"rendered":"<p>ecshop\u7cfb\u7edf\u8bbe\u7f6e\u7684\u65f6\u5019\uff0c\u5f00\u542f\u4e86gzip\u9875\u9762\u538b\u7f29\u3002\u5f53\u65f6\u4e5f\u6ca1\u6709\u592a\u5927\u6ce8\u610f\uff0c\u540e\u6765\u5c31\u4fee\u6539\u6a21\u677f\u5176\u4ed6\u4e1c\u897f\u53bb\u4e86\u3002   &nbsp;   \u4e0a\u4f20\u6d4b\u8bd5\u7684\u65f6\u5019\uff0c\u7ad9\u70b9\u663e\u793a\u65e0\u6cd5\u6253\u5f00\u3002\u968f\u540e\u6211\u7528\u7f51\u5740\u6253\u5f00\u6839\u76ee\u5f55\u7684robots\u6587\u4ef6\u3001\u56fe\u7247\u3001\u9759\u6001\u9875\u00b7\u00b7\u00b7\u5168\u90e8\u53ef\u4ee5\u6b63\u5e38\u6253\u5f00\u00b7\u00b7\u00b7   &nbsp;   \u6211\u5c34\u5c2c\u00b7\u00b7\u00b7\u4e00\u4e00\u68c0\u67e5\u540e\uff0c\u6211\u5c31\u6000\u7591\u662f\u4e0d\u662f\u5ba2\u6237\u5f53\u521d\u8bbe\u7f6egzip\u538b\u7f29\u7684\u95ee\u9898\u4e86\u3002\u4f46\u8fde\u540e\u53f0\u90fd\u8fdb\u4e0d\u4e86\u3002   &nbsp;   \u8fd9\u65f6\u6211\u5148\u627e\u5230\u5224\u65adgzip\u662f\u5426\u5f00\u542f\u7684\u8bed\u53e5\uff0c\u7136\u540e\u5728\u6e90\u7801\u91cc\u9762\u4e0d\u505a\u5224\u65ad\uff0c\u8d77\u7801\u53ef\u4ee5\u8fdb\u540e\u53f0\u5148\u3002   &nbsp;   \u627e\u5230admin\/includes\/init.php   &nbsp;   \u62c9\u5230\u6700\u4e0b\u9762\uff0c\u628a   &nbsp;   if (gzip_enabled())   {   &nbsp; &nbsp; ob_start(&#8216;ob_gzhandler&#8217;);   }   else   {   &nbsp; &nbsp; ob_start();   }   &nbsp;   \u6ce8\u91ca\u6389\u6216\u5220\u9664\u3002\u4e0a\u4f20\u8986\u76d6\u3002   &nbsp;   \u8fd9\u4e2a\u65f6\u5019\u53ef\u4ee5\u6253\u5f00ecshop\u7684\u540e\u53f0\u4e86\u3002\u8fdb\u5165\u540e\u53f0\u4e4b\u540e\uff0c\u5546\u5e97\u8bbe\u7f6e&#8212;\u57fa\u672c\u8bbe\u7f6e&#8212;\u628agzip\u5173\u95ed\u3002   &nbsp;   \u628ainit.php\u6587\u4ef6\u8fd8\u539f\uff0c\u4e0a\u4f20\u8986\u76d6\u3002   &nbsp;   ok\uff0c\u8fd9\u4e2a\u65f6\u5019\u6b63\u5e38\u53ef\u4ee5\u8bbf\u95ee\u4e86\u3002  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>ecshop\u7cfb\u7edf\u8bbe\u7f6e\u7684\u65f6\u5019\uff0c\u5f00\u542f&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4925],"tags":[],"class_list":["post-198987","post","type-post","status-publish","format-standard","hentry","category-4925"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/198987","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=198987"}],"version-history":[{"count":0,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/198987\/revisions"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=198987"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=198987"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=198987"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}