{"id":60905,"date":"2025-04-26T08:09:49","date_gmt":"2025-04-26T00:09:49","guid":{"rendered":"https:\/\/fwq.ai\/blog\/60905\/"},"modified":"2025-04-26T08:09:49","modified_gmt":"2025-04-26T00:09:49","slug":"%e8%a7%a3%e5%86%b3zencart%e5%90%8e%e5%8f%b0%e5%87%ba%e7%8e%b0%e4%b9%b1%e7%a0%81%e7%9a%84%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/60905\/","title":{"rendered":"\u89e3\u51b3zencart\u540e\u53f0\u51fa\u73b0\u4e71\u7801\u7684\u65b9\u6cd5"},"content":{"rendered":"<p>\u5728\u8c03\u8bd5\u540e\u53f0\u7684english\u548cfrench\u5207\u6362\u65f6\uff0c\u5f53\u5207\u6362\u5230firench\u90fd\u662f\u4e71\u7801\uff0c\u4e0b\u9762\u662f\u89e3\u51b3\u65b9\u6cd5\u3002<\/p>\n<p> zencart\u5b89\u88c5\u7684\u65f6\u5019\u4f7f\u7528\u7684\u662fiso-8859-1\u4e3a\u9ed8\u8ba4\u5b57\u7b26\u96c6\uff0c\u5982\u679c\u4f60\u5b89\u88c5\u5176\u4ed6\u8bed\u8a00\u5305\u65f6\uff0c\u4f60\u7684\u7f51\u7ad9\u4f1a\u51fa\u73b0\u5f88\u591a\u4e71\u7801\u3002<\/p>\n<p> \u6700\u597d\u7684\u529e\u6cd5\u662f\u4fee\u6539zencart\u7684\u5b57\u7b26\u96c6\u914d\u7f6e\uff0c\u4fee\u6539\u8bed\u8a00\u5305\u5b57\u7b26\u7f16\u7801\uff0c\u4f7f\u7528utf-8\u3002<\/p>\n<p> \u7b2c\u4e00\u4e2a\u4fee\u6539\u7684\u5730\u65b9\uff1a<\/p>\n<p> includes\/languages\/english.PHP\u5728\u8fd9\u4e2a\u6587\u4ef6\u4e2dincludes\/languages\/english.PHP<\/p>\n<p> \u627e\u5230CHARSET\u4fee\u6539 define(\u2019CHARSET\u2019, \u2018iso-8859-1\u2032)\u4e3adefine(\u2019CHARSET\u2019, \u2018utf-8\u2032);<\/p>\n<p> \u5982\u679c\u4f60\u7f51\u7ad9\u4e0a\u6d77\u88c5\u6709\u5176\u4ed6\u7248\u672c\u7684\u8bed\u8a00\uff0c\u4e5f\u662f\u627e\u5230\u76f8\u5bf9\u5e94\u7684\u8bed\u8a00\u6587\u4ef6\uff0c\u628a\u5b57\u7b26\u683c\u5f0f\u7ed9\u4e3autf-8\u56fd\u9645\u901a\u7528\u5b57\u7b26\u683c\u5f0f\u3002<\/p>\n<p> \u7b2c\u4e8c\u4e2a\u4fee\u6539\u7684\u5730\u65b9(\u4e00\u822c\u60c5\u51b5\u4e0b\u4e0d\u9700\u8981\u4fee\u6539\uff0c\u53ea\u8981\u4fee\u6539\u8bed\u8a00\u5e38\u91cf\u6587\u4ef6\u5c31\u53ef\u4ee5\u4e86)\uff1a<\/p>\n<p> \u627e\u5230 includes\\classes\\db\\mysql&nbsp;\u76ee\u5f55\u4e0b\u7684 query_factory.PHP \u6587\u4ef6\u4e2d\u627e\u5230\uff1a<\/p>\n<p> if (@mysql_select_db($zf_database, $this-&gt;link)) {<br \/>\n<br \/> $this-&gt;db_connected = true;<\/p>\n<p> \u5728\u540e\u9762\u52a0\u4e0a\u94fe\u63a5\u6570\u636e\u5e93\u7684\u683c\u5f0f\uff0c\u5728\u540e\u9762\u52a0\u4e0a<\/p>\n<p> mysql_query(\u201dSET NAMES \u2018utf8\u2032\u201d, $this-&gt;link);<br \/>\n<br \/> mysql_query(\u201dSET CHARACTER SET UTF8\u3003, $this-&gt;link);<\/p>\n<p> \u8fd9\u6837\u5c31\u53ef\u4ee5\u4e86\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728\u8c03\u8bd5\u540e\u53f0\u7684english\u548cfrench\u5207\u6362\u65f6\uff0c\u5f53\u5207\u6362\u5230firench\u90fd\u662f\u4e71\u7801\uff0c\u4e0b\u9762\u662f\u89e3\u51b3\u65b9\u6cd5\u3002 zencart\u5b89\u88c5\u7684\u65f6\u5019\u4f7f\u7528\u7684\u662fiso-8859-1\u4e3a\u9ed8\u8ba4\u5b57\u7b26\u96c6\uff0c\u5982\u679c\u4f60\u5b89\u88c5\u5176\u4ed6\u8bed\u8a00\u5305\u65f6\uff0c\u4f60\u7684\u7f51\u7ad9\u4f1a\u51fa\u73b0\u5f88\u591a\u4e71\u7801\u3002 \u6700\u597d\u7684\u529e\u6cd5\u662f\u4fee\u6539zencart\u7684\u5b57\u7b26\u96c6\u914d\u7f6e\uff0c\u4fee\u6539\u8bed\u8a00\u5305\u5b57\u7b26\u7f16\u7801\uff0c\u4f7f\u7528utf-8\u3002 \u7b2c\u4e00\u4e2a\u4fee\u6539\u7684\u5730\u65b9\uff1a includes\/languages\/english.PHP\u5728\u8fd9\u4e2a\u6587\u4ef6\u4e2dincludes\/languages\/english.PHP \u627e\u5230CHARSET\u4fee\u6539 define(\u2019CHARSET\u2019, \u2018iso-8859-1\u2032)\u4e3adefine(\u2019CHARSET\u2019, \u2018utf-8\u2032); \u5982\u679c\u4f60\u7f51\u7ad9\u4e0a\u6d77\u88c5\u6709\u5176\u4ed6\u7248\u672c\u7684\u8bed\u8a00\uff0c\u4e5f\u662f\u627e\u5230\u76f8\u5bf9\u5e94\u7684\u8bed\u8a00\u6587\u4ef6\uff0c\u628a\u5b57\u7b26\u683c\u5f0f\u7ed9\u4e3autf-8\u56fd\u9645\u901a\u7528\u5b57\u7b26\u683c\u5f0f\u3002 \u7b2c\u4e8c\u4e2a\u4fee\u6539\u7684\u5730\u65b9(\u4e00\u822c\u60c5\u51b5\u4e0b\u4e0d\u9700\u8981\u4fee\u6539\uff0c\u53ea\u8981\u4fee\u6539\u8bed\u8a00\u5e38\u91cf\u6587\u4ef6\u5c31\u53ef\u4ee5\u4e86)\uff1a \u627e\u5230 includes\\classes\\db\\mysql&nbsp;\u76ee\u5f55\u4e0b\u7684 query_factory.PHP \u6587\u4ef6\u4e2d\u627e\u5230\uff1a if (@mysql_select_db($zf_database, $this-&gt;link)) { $this-&gt;db_connected = true; \u5728\u540e\u9762\u52a0\u4e0a\u94fe\u63a5\u6570\u636e\u5e93\u7684\u683c\u5f0f\uff0c\u5728\u540e\u9762\u52a0\u4e0a mysql_query(\u201dSET NAMES \u2018utf8\u2032\u201d, $this-&gt;link); mysql_query(\u201dSET CHARACTER SET UTF8\u3003, $this-&gt;link); \u8fd9\u6837\u5c31\u53ef\u4ee5\u4e86\u3002<\/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-60905","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/60905","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=60905"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/60905\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=60905"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=60905"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=60905"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}