{"id":198998,"date":"2025-05-03T09:08:59","date_gmt":"2025-05-03T01:08:59","guid":{"rendered":"https:\/\/server.hk\/cnblog\/198998\/"},"modified":"2025-05-03T09:08:59","modified_gmt":"2025-05-03T01:08:59","slug":"%e7%bb%99ecshop%e5%95%86%e5%93%81%e8%af%a6%e6%83%85%e9%a1%b5%e5%a2%9e%e5%8a%a0%e8%87%aa%e5%ae%9a%e4%b9%89title%e7%9a%84%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/198998\/","title":{"rendered":"\u7ed9\u201cECSHOP\u5546\u54c1\u8be6\u60c5\u9875\u201d\u589e\u52a0\u81ea\u5b9a\u4e49TITLE\u7684\u65b9\u6cd5"},"content":{"rendered":"<p><strong>\u6211\u60f3\u5728ECSHOP\u540e\u53f0\u81ea\u5b9a\u4e49\u6bcf\u4e2a\u5546\u54c1\u8be6\u60c5\u9875\u7684TITLE, \u8be5\u5982\u4f55\u6765\u5b9e\u73b0\u5462\uff1f\uff1f\uff08\u542c\u8bf4\u8fd9\u6837\u4f1a\u5bf9SEO\u66f4\u6709\u5229\uff09<br \/> <\/strong><br \/> \u4e0b\u9762\u5c31\u6765\u8bb2\u4e00\u8bb2\u5177\u4f53\u7684\u4fee\u6539\u65b9\u6cd5\uff1a<br \/> \u6ce8\uff1a\u4ee5\u4e0b\u6559\u7a0b\u662f\u5728\u201c\u672a\u8fdb\u884c\u8fc7\u4efb\u4f55\u4fee\u6539\u7684&nbsp;ecshop2.7.2 \u4ee3\u7801 +&nbsp; \u5b98\u65b9\u9ed8\u8ba4\u6a21\u677f\u201d \u57fa\u7840\u4e0a\u8bb2\u89e3\u7684\u3002&nbsp;<\/p>\n<p> \u7b2c1\u6b65\uff1a \u4fee\u6539\u6570\u636e\u5e93\u7ed3\u6784\uff0c\u5176\u5b9e\u5c31\u662f\u589e\u52a0\u4e2a\u5b57\u6bb5<\/p>\n<p> \u8fdb\u5165 \u540e\u53f0 \u300b\u6570\u636e\u5e93\u7ba1\u7406 \u300bSQL\u67e5\u8be2&nbsp;&nbsp; \uff0c <br \/> \u5728\u8f93\u5165\u6846\u91cc\u8f93\u5165\u4e0b\u9762SQL\u8bed\u53e5\uff0c\u5e76\u70b9\u51fb\u201c\u63d0\u4ea4\u67e5\u8be2\u201d <\/p>\n<table cellspacing=\"0\" cellpadding=\"5\" style=\"border-right: #cccccc 1px solid;border-top: #cccccc 1px solid;background: #f7f7f7;border-left: #cccccc 1px solid;width: 90%;border-bottom: #cccccc 1px solid\">\n<tbody>\n<tr>\n<td><span><font><span>ALTER<\/span> <span>TABLE<\/span> <span>`ecs_goods`<\/span> <span>ADD<\/span> <span>`goods_title`<\/span> <span>VARCHAR<\/span><span>(<\/span> <span>150<\/span> <span>)<\/span> <span>NOT<\/span> <span>NULL<\/span> <span>DEFAULT<\/span> <span>&#8221;<\/span> <span>AFTER<\/span> <span>`goods_name`<\/span> <\/font><\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p> \u7b2c2\u6b65\uff1a<br \/>\n<br \/> \u4fee\u6539\u540e\u53f0\u6a21\u677f\u6587\u4ef6&nbsp; \/admin\/templates\/goods_info.htm<br \/>\n<br \/> \u627e\u5230 <\/p>\n<table cellspacing=\"0\" cellpadding=\"5\" style=\"border-right: #cccccc 1px solid;border-top: #cccccc 1px solid;background: #f7f7f7;border-left: #cccccc 1px solid;width: 90%;border-bottom: #cccccc 1px solid\">\n<tbody>\n<tr>\n<td><font>&lt;table width=&#8221;90%&#8221; id=&#8221;general-table&#8221; align=&#8221;center&#8221;&gt;<\/font><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p> \u5728\u5b83\u4e0b\u9762\u589e\u52a0\u4e00\u884c\u4ee3\u7801<br \/>\n <\/p>\n<table cellspacing=\"0\" cellpadding=\"5\" style=\"border-right: #cccccc 1px solid;border-top: #cccccc 1px solid;background: #f7f7f7;border-left: #cccccc 1px solid;width: 90%;border-bottom: #cccccc 1px solid\">\n<tbody>\n<tr>\n<td><font>&lt;tr&gt;&lt;td class=&#8221;label&#8221;&gt;\u81ea\u5b9a\u4e49\u5546\u54c1\u9875\u9762TITLE&lt;\/td&gt;&lt;td&gt;&lt;input type=&#8221;text&#8221; name=&#8221;goods_title&#8221; value=&#8221;{$goods.goods_title|escape}&#8221; size=&#8221;50&#8243; \/&gt;&lt;\/td&gt;&lt;\/tr&gt;<\/font><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p> &nbsp;\u7b2c3\u6b65\uff1a<br \/>\n<br \/> \u4fee\u6539\u540e\u53f0\u7a0b\u5e8f\u6587\u4ef6 \/admin\/goods.php<br \/>\n<br \/> \u627e\u5230<br \/>\n <\/p>\n<table cellspacing=\"0\" cellpadding=\"5\" style=\"border-right: #cccccc 1px solid;border-top: #cccccc 1px solid;background: #f7f7f7;border-left: #cccccc 1px solid;width: 90%;border-bottom: #cccccc 1px solid\">\n<tbody>\n<tr>\n<td><font>$sql = &#8220;INSERT INTO &#8221; . $ecs-&gt;table(&#8216;goods&#8217;) . &#8221; (goods_name, goods_name_style, goods_sn, &#8221; .<\/font><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p> \u4fee\u6539\u4e3a\uff08<br \/>\n<span style=\"color: #0000ff\">\u6ce8\u610f\u4e00\u5171\u80fd\u641c\u5230\u4e24\u5904\uff0c\u6bcf\u5904\u90fd\u8981\u4fee\u6539<\/span>\uff09<br \/>\n <\/p>\n<table cellspacing=\"0\" cellpadding=\"5\" style=\"border-right: #cccccc 1px solid;border-top: #cccccc 1px solid;background: #f7f7f7;border-left: #cccccc 1px solid;width: 90%;border-bottom: #cccccc 1px solid\">\n<tbody>\n<tr>\n<td><font>$sql = &#8220;INSERT INTO &#8221; . $ecs-&gt;table(&#8216;goods&#8217;) . &#8221; (goods_name, goods_title, goods_name_style, goods_sn, &#8221; .<\/font><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p> \u7ee7\u7eed\u627e\u5230 <\/p>\n<table cellspacing=\"0\" cellpadding=\"5\" style=\"border-right: #cccccc 1px solid;border-top: #cccccc 1px solid;background: #f7f7f7;border-left: #cccccc 1px solid;width: 90%;border-bottom: #cccccc 1px solid\">\n<tbody>\n<tr>\n<td><font>&#8220;VALUES (&#8216;$_POST[goods_name]&#8217;, &#8216;$goods_name_style&#8217;, &#8216;$goods_sn&#8217;, &#8216;$catgory_id&#8217;, &#8221; .<\/font><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p> \u4fee\u6539\u4e3a\uff08<br \/>\n<span style=\"color: #0000ff\">\u6ce8\u610f\u4e00\u5171\u80fd\u641c\u5230\u4e24\u5904\uff0c\u6bcf\u5904\u90fd\u8981\u4fee\u6539<\/span>\uff09 <\/p>\n<table cellspacing=\"0\" cellpadding=\"5\" style=\"border-right: #cccccc 1px solid;border-top: #cccccc 1px solid;background: #f7f7f7;border-left: #cccccc 1px solid;width: 90%;border-bottom: #cccccc 1px solid\">\n<tbody>\n<tr>\n<td><font>&#8220;VALUES (&#8216;$_POST[goods_name]&#8217;,&#8217;$_POST[goods_title]&#8217;, &#8216;$goods_name_style&#8217;, &#8216;$goods_sn&#8217;, &#8216;$catgory_id&#8217;, &#8221; .<\/font><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p> \u7ee7\u7eed\u641c\u7d22\u627e\u5230\u4e0b\u9762\u4ee3\u7801<br \/>\n <\/p>\n<table cellspacing=\"0\" cellpadding=\"5\" style=\"border-right: #cccccc 1px solid;border-top: #cccccc 1px solid;background: #f7f7f7;border-left: #cccccc 1px solid;width: 90%;border-bottom: #cccccc 1px solid\">\n<tbody>\n<tr>\n<td><font>&#8220;goods_name = &#8216;$_POST[goods_name]&#8217;, &#8221; .<\/font><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p> \u5c06\u5b83\u4fee\u6539\u4e3a<br \/>\n <\/p>\n<table cellspacing=\"0\" cellpadding=\"5\" style=\"border-right: #cccccc 1px solid;border-top: #cccccc 1px solid;background: #f7f7f7;border-left: #cccccc 1px solid;width: 90%;border-bottom: #cccccc 1px solid\">\n<tbody>\n<tr>\n<td><font>&#8220;goods_name = &#8216;$_POST[goods_name]&#8217;, goods_title=&#8217;$_POST[goods_title]&#8217;,&#8221; .<\/font><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p> \u7b2c4\u6b65\uff1a<\/p>\n<p> \u4fee\u6539ECSHOP\u524d\u53f0\u5546\u54c1\u7a0b\u5e8f\u6587\u4ef6\uff0c<br \/>\n<br \/> \u6253\u5f00&nbsp; \/goods.php&nbsp; \u6587\u4ef6<br \/>\n<br \/> \u627e\u5230<br \/>\n <\/p>\n<table cellspacing=\"0\" cellpadding=\"5\" style=\"border-right: #cccccc 1px solid;border-top: #cccccc 1px solid;background: #f7f7f7;border-left: #cccccc 1px solid;width: 90%;border-bottom: #cccccc 1px solid\">\n<tbody>\n<tr>\n<td><font>$smarty-&gt;assign(&#8216;page_title&#8217;,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $position[&#8216;title&#8217;]);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \/\/ \u9875\u9762\u6807\u9898<\/font><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p> \u4fee\u6539\u4e3a<br \/>\n <\/p>\n<table cellspacing=\"0\" cellpadding=\"5\" style=\"border-right: #cccccc 1px solid;border-top: #cccccc 1px solid;background: #f7f7f7;border-left: #cccccc 1px solid;width: 90%;border-bottom: #cccccc 1px solid\">\n<tbody>\n<tr>\n<td><font>$page_title=!empty($goods[&#8216;goods_title&#8217;]) ? $goods[&#8216;goods_title&#8217;] : $position[&#8216;title&#8217;];<br \/> &nbsp;&nbsp;$smarty-&gt;assign(&#8216;page_title&#8217;,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $page_title);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \/\/ \u9875\u9762\u6807\u9898<\/font><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p> &nbsp;\u6700\u540e\uff0c\u522b\u5fd8\u4e86\u5230\u540e\u53f0\u6e05\u9664\u7f13\u5b58\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6211\u60f3\u5728ECSHOP\u540e\u53f0\u81ea\u5b9a\u4e49\u6bcf\u4e2a&#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-198998","post","type-post","status-publish","format-standard","hentry","category-4925"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/198998","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=198998"}],"version-history":[{"count":0,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/198998\/revisions"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=198998"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=198998"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=198998"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}