{"id":60849,"date":"2025-04-26T08:43:34","date_gmt":"2025-04-26T00:43:34","guid":{"rendered":"https:\/\/fwq.ai\/blog\/60849\/"},"modified":"2025-04-26T08:43:34","modified_gmt":"2025-04-26T00:43:34","slug":"zencart%e4%b8%8d%e5%90%8c%e5%9f%9f%e5%90%8d%e8%a7%a3%e6%9e%90%e8%ae%be%e7%bd%ae%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/60849\/","title":{"rendered":"ZenCart\u4e0d\u540c\u57df\u540d\u89e3\u6790\u8bbe\u7f6e\u65b9\u6cd5"},"content":{"rendered":"<p> zencart\u5728includes\/configure.php\u6587\u4ef6\u5934\u90e8\u6ce8\u91ca\u4e0b\u9762\u6dfb\u52a0<\/p>\n<blockquote>\n<p> $severname=preg_replace(\u2019\/(www.)|(..+)\/\u2019,\u201d,$_SERVER[&#8216;SERVER_NAME&#8217;]);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\/\/\u6dfb\u52a0\u6b63\u5219\u8868\u8fbe\u5f0f\u53bb\u6389\u57df\u540d\u4e2d\u201d.\u201d\u53f7\u7684\u524d\u9762\u90e8\u5206\u548c\u201d.\u201d\u53f7\u7684\u540e\u9762\u90e8\u5206\u5982:www.waimaole.com&nbsp;&nbsp;&nbsp;\u53bb\u6389\u540e\u53d8\u6210waimaole<br \/> define(\u2019HTTP_SERVER\u2019, \u2018http:\/\/\u2019 . $_SERVER[&#8216;SERVER_NAME&#8217;]);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\/\/\u83b7\u53d6\u57df\u540d\u540d\u79f0<br \/> define(\u2019HTTPS_SERVER\u2019, \u2018https:\/\/\u2019 . $_SERVER[&#8216;SERVER_NAME&#8217;]);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\/\/\u83b7\u53d6\u57df\u540d\u540d\u79f0<\/p>\n<\/blockquote>\n<p> \u4fee\u6539\u540e\u7684\u6587\u4ef6\u4e3a:<\/p>\n<blockquote>\n<p> &lt;?php<\/p>\n<p> &nbsp;<\/p>\n<p> \/\/ Define the webserver and path parameters<br \/> \/\/ HTTP_SERVER is your Main webserver: eg-http:\/\/www.your_domain.com<br \/> \/\/ HTTPS_SERVER is your Secure webserver: eg-https:\/\/www.your_domain.com<br \/> $severname=preg_replace(\u2019\/(www.)|(..+)\/\u2019,\u201d,$_SERVER[&#8216;SERVER_NAME&#8217;]);<br \/> define(\u2019HTTP_SERVER\u2019, \u2018http:\/\/\u2019 . $_SERVER[&#8216;SERVER_NAME&#8217;]);<br \/> define(\u2019HTTPS_SERVER\u2019, \u2018https:\/\/\u2019 . $_SERVER[&#8216;SERVER_NAME&#8217;]);<\/p>\n<p> \/\/ Use secure webserver for checkout procedure?<br \/> define(\u2019ENABLE_SSL\u2019, \u2018false\u2019);<\/p>\n<p> \/\/ NOTE: be sure to leave the trailing \u2018\/\u2019 at the end of these lines if you make changes!<br \/> \/\/ * DIR_WS_* = Webserver directories (virtual\/URL)<br \/> \/\/ these paths are relative to top of your webspace \u2026 (ie: under the public_html or httpdocs folder)<br \/> define(\u2019DIR_WS_CATALOG\u2019, \u2018\/\u2019);<br \/> define(\u2019DIR_WS_HTTPS_CATALOG\u2019, \u2018\/\u2019);<\/p>\n<p> define(\u2019DIR_WS_IMAGES\u2019, \u2018images\/\u2019);<br \/> define(\u2019DIR_WS_INCLUDES\u2019, \u2018includes\/\u2019);<br \/> define(\u2019DIR_WS_FUNCTIONS\u2019, DIR_WS_INCLUDES . \u2018functions\/\u2019);<br \/> define(\u2019DIR_WS_CLASSES\u2019, DIR_WS_INCLUDES . \u2018classes\/\u2019);<br \/> define(\u2019DIR_WS_MODULES\u2019, DIR_WS_INCLUDES . \u2018modules\/\u2019);<br \/> define(\u2019DIR_WS_LANGUAGES\u2019, DIR_WS_INCLUDES . \u2018languages\/\u2019);<br \/> define(\u2019DIR_WS_DOWNLOAD_PUBLIC\u2019, DIR_WS_CATALOG . \u2018pub\/\u2019);<br \/> define(\u2019DIR_WS_TEMPLATES\u2019, DIR_WS_INCLUDES . \u2018templates\/\u2019);<\/p>\n<p> define(\u2019DIR_WS_PHPBB\u2019, \u2018\/\u2019);<\/p>\n<p> \/\/ * DIR_FS_* = Filesystem directories (local\/physical)<br \/> \/\/the following path is a COMPLETE path to your&nbsp;Zen Cart&nbsp;files. eg: \/var\/www\/vhost\/accountname\/public_html\/store\/<br \/> define(\u2019DIR_FS_CATALOG\u2019, \u2018\/vhost3\/\u2019.$severname.\u2019.com\/\u2019);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\/\/\u7f51\u7ad9\u5b58\u653e\u7684\u5730\u5740<\/p>\n<p> define(\u2019DIR_FS_DOWNLOAD\u2019, DIR_FS_CATALOG . \u2018download\/\u2019);<br \/> define(\u2019DIR_FS_DOWNLOAD_PUBLIC\u2019, DIR_FS_CATALOG . \u2018pub\/\u2019);<br \/> define(\u2019DIR_WS_UPLOADS\u2019, DIR_WS_IMAGES . \u2018uploads\/\u2019);<br \/> define(\u2019DIR_FS_UPLOADS\u2019, DIR_FS_CATALOG . DIR_WS_UPLOADS);<br \/> define(\u2019DIR_FS_EMAIL_TEMPLATES\u2019, DIR_FS_CATALOG . \u2018email\/\u2019);<\/p>\n<p> \/\/ define our database connection<br \/> define(\u2019DB_TYPE\u2019, \u2018mysql\u2019);<br \/> define(\u2019DB_PREFIX\u2019, \u2018zen_\u2019);<br \/> define(\u2019DB_SERVER\u2019, \u2018localhost\u2019);<br \/> define(\u2019DB_SERVER_USERNAME\u2019, \u2018mysql\u7528\u6237\u540d\u2019);<br \/> define(\u2019DB_SERVER_PASSWORD\u2019, \u2018mysql\u5bc6\u7801\u2019);<br \/> define(\u2019DB_DATABASE\u2019, $severname);&nbsp;&nbsp;&nbsp;\/\/\u4ee5\u6b63\u5219\u8868\u8fbe\u5f0f\u622a\u53d6\u540e\u7684\u57df\u540d\u4e3a\u6570\u636e\u540d\u79f0<br \/> define(\u2019USE_PCONNECT\u2019, \u2018false\u2019);<br \/> define(\u2019STORE_SESSIONS\u2019, \u2018db\u2019);<br \/> \/\/ for STORE_SESSIONS, use \u2018db\u2019 for best support, or \u201d for file-based storage<\/p>\n<p> \/\/ The next 2 \u201cdefines\u201d are for SQL cache support.<br \/> \/\/ For SQL_CACHE_METHOD, you can select from:&nbsp;&nbsp;none, database, or file<br \/> \/\/ If you choose \u201cfile\u201d, then you need to set the DIR_FS_SQL_CACHE to a directory where your apache<br \/> \/\/ or webserver user has write privileges (chmod 666 or 777). We recommend using the \u201ccache\u201d folder inside the Zen Cart folder<br \/> \/\/ ie: \/path\/to\/your\/webspace\/public_html\/zen\/cache&nbsp;&nbsp;&nbsp;\u2014 leave no trailing slash<br \/> define(\u2019SQL_CACHE_METHOD\u2019, \u2018file\u2019);<br \/> define(\u2019DIR_FS_SQL_CACHE\u2019, \u2018\/vhost3\/\u2019.$severname.\u2019.com\/cache\u2019);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\/\/\u7f51\u7ad9\u5b58\u653e\u7684\u5730\u5740<\/p>\n<p> \/\/ EOF<\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>zencart\u5728includes\/configure.php\u6587\u4ef6\u5934\u90e8\u6ce8\u91ca\u4e0b\u9762\u6dfb\u52a0 $severname=preg_replace(\u2019\/(www.)|(..+)\/\u2019,\u201d,$_SERVER[&#8216;SERVER_NAME&#8217;]);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\/\/\u6dfb\u52a0\u6b63\u5219\u8868\u8fbe\u5f0f\u53bb\u6389\u57df\u540d\u4e2d\u201d.\u201d\u53f7\u7684\u524d\u9762\u90e8\u5206\u548c\u201d.\u201d\u53f7\u7684\u540e\u9762\u90e8\u5206\u5982:www.waimaole.com&nbsp;&nbsp;&nbsp;\u53bb\u6389\u540e\u53d8\u6210waimaole define(\u2019HTTP_SERVER\u2019, \u2018http:\/\/\u2019 . $_SERVER[&#8216;SERVER_NAME&#8217;]);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\/\/\u83b7\u53d6\u57df\u540d\u540d\u79f0 define(\u2019HTTPS_SERVER\u2019, \u2018https:\/\/\u2019 . $_SERVER[&#8216;SERVER_NAME&#8217;]);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\/\/\u83b7\u53d6\u57df\u540d\u540d\u79f0 \u4fee\u6539\u540e\u7684\u6587\u4ef6\u4e3a: &lt;?php &nbsp; \/\/ Define the webserver and path parameters \/\/ HTTP_SERVER is your Main webserver: eg-http:\/\/www.your_domain.com \/\/ HTTPS_SERVER is your Secure webserver: eg-https:\/\/www.your_domain.com $severname=preg_replace(\u2019\/(www.)|(..+)\/\u2019,\u201d,$_SERVER[&#8216;SERVER_NAME&#8217;]); define(\u2019HTTP_SERVER\u2019, \u2018http:\/\/\u2019 . $_SERVER[&#8216;SERVER_NAME&#8217;]); define(\u2019HTTPS_SERVER\u2019, \u2018https:\/\/\u2019 . $_SERVER[&#8216;SERVER_NAME&#8217;]); \/\/ Use secure webserver for checkout procedure? define(\u2019ENABLE_SSL\u2019, \u2018false\u2019); \/\/ NOTE: be [&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-60849","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/60849","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=60849"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/60849\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=60849"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=60849"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=60849"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}