{"id":59700,"date":"2025-04-23T08:12:56","date_gmt":"2025-04-23T00:12:56","guid":{"rendered":"https:\/\/fwq.ai\/blog\/59700\/"},"modified":"2025-04-23T08:12:56","modified_gmt":"2025-04-23T00:12:56","slug":"ecshop%e6%a8%a1%e6%9d%bf%e7%b3%bb%e7%bb%9f%e5%8f%98%e9%87%8f%e8%b0%83%e8%8a%82%e6%a0%87%e7%ad%be%e8%af%b4%e6%98%8e","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/59700\/","title":{"rendered":"ECSHOP\u6a21\u677f\u7cfb\u7edf\u53d8\u91cf\u8c03\u8282\u6807\u7b7e\u8bf4\u660e"},"content":{"rendered":"<p> ECSHOP\u4f5c\u4e3a\u56fd\u5185\u4f7f\u7528\u6700\u591a\u7684\u7f51\u4e0a\u5546\u57ce\u7cfb\u7edf\uff0c\u5374\u6ca1\u6709\u4e00\u4e2a\u5f88\u597d\u7684API\u624b\u518c\uff0c\u7740\u5b9e\u6bd4\u8f83\u8ba9\u6211\u4eec\u8d39\u5fc3\uff0c\u8981\u60f3\u67e5\u627e\u4e00\u4e2a\u51fd\u6570\u7684\u529f\u80fd\uff0c\u53ea\u80fd\u901a\u8fc7\u67e5\u770b\u5176\u7a0b\u5e8f\u7684\u6e90\u4ee3\u7801\u624d\u53ef\u4ee5\u77e5\u9053\u6709\u4ec0\u4e48\u529f\u80fd\uff0c\u5b98\u65b9\u7684\u624b\u518c\u4e5f\u4e0d\u5168\u9762\uff0c\u5f88\u591a\u4e1c\u897f\u90fd\u6ca1\u6709\u7f16\u5199\u5b8c\u6210\uff0c\u53ef\u80fd\u4f5c\u8005\u5df2\u7ecf\u4e0d\u60f3\u5728\u7ef4\u62a4\u8fd9\u4e2a\u7a0b\u5e8f\u4e86\uff0cECSHOP\u7684\u7248\u672c\u4e5f\u5f88\u4e45\u6ca1\u6709\u66f4\u65b0\u4e86\u3002<\/p>\n<p> \u4ecb\u4e8e\u5982\u6b64\uff0c\u6211\u5c31\u5206\u4eab\u4e00\u4e2aECSHOP\u6a21\u677f\u7cfb\u7edf\u53d8\u91cf\u8c03\u8282\u6807\u7b7e\u8bf4\u660e\uff0c\u5e0c\u671b\u5bf9\u4e8eECSHOP\u5546\u57ce\u4e8c\u6b21\u5f00\u53d1\u7684\u5f00\u53d1\u4eba\u5458\u6709\u6240\u5e2e\u52a9\u3002<\/p>\n<h2> escape [\u7f16\u7801]<\/h2>\n<table border=\"0\">\n<thead>\n<tr>\n<td> \u53c2\u6570\u4f4d\u7f6e<\/td>\n<td> \u53c2\u6570\u7c7b\u578b<\/td>\n<td> \u5fc5\u9700<\/td>\n<td> \u53ef\u7528\u53c2\u6570<\/td>\n<td> \u9ed8\u8ba4<\/td>\n<td> \u63cf\u8ff0<\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td> 1<\/td>\n<td> string<\/td>\n<td> No<\/td>\n<td> html,url,quotes<\/td>\n<td> html<\/td>\n<td> \u4f7f\u7528\u4f55\u79cd\u7f16\u7801\u683c\u5f0f<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p> \u63cf\u8ff0<\/p>\n<p> \u7528\u4e8ehtml\u8f6c\u7801,url\u8f6c\u7801,\u5728\u6ca1\u6709\u8f6c\u7801\u7684\u53d8\u91cf\u4e0a\u8f6c\u6362\u5355\u5f15\u53f7,\u5341\u516d\u8fdb\u5236\u8f6c\u7801,\u5341\u516d\u8fdb\u5236\u7f8e\u5316\u8f6c\u7801\u3002\u9ed8\u8ba4\u662fhtml\u8f6c\u7801\u3002<\/p>\n<p> \u5b9e\u4f8b<\/p>\n<pre>\r\n{$articleTitle}\r\n{$articleTitle|escape}\r\n{$articleTitle|escape:\"html\"} {* escapes&amp; \" ' &lt;&gt; *}\r\n{$articleTitle|escape:\"url\"}\r\n{$articleTitle|escape:\"quotes\"}<\/pre>\n<h2> nl2br [\u6362\u884c\u7b26\u66ff\u6362\u6210 &lt;br \/&gt;]<\/h2>\n<p> \u63cf\u8ff0<\/p>\n<p> \u6240\u6709\u7684\u6362\u884c\u7b26\u5c06\u88ab\u66ff\u6362\u6210 &lt;br \/&gt;.\u529f\u80fd\u540cPHP\u4e2d\u7684nl2br()\u51fd\u6570\u4e00\u6837.<\/p>\n<p> \u4f8b\u5b50<\/p>\n<pre>\r\n{$articleTitle|nl2br}<\/pre>\n<p> \u8f93\u51fa<\/p>\n<pre>\r\nSun or rain expected&lt;br \/&gt;today, dark tonight<\/pre>\n<h2> default [\u9ed8\u8ba4\u503c]<\/h2>\n<table border=\"0\">\n<thead>\n<tr>\n<td> \u53c2\u6570\u4f4d\u7f6e<\/td>\n<td> \u53c2\u6570\u7c7b\u578b<\/td>\n<td> \u5fc5\u9700<\/td>\n<td> \u9ed8\u8ba4<\/td>\n<td> \u63cf\u8ff0<\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td> 1<\/td>\n<td> string<\/td>\n<td> No<\/td>\n<td> empty<\/td>\n<td> \u8fd9\u662f\u53d8\u91cf\u4e3a\u7a7a\u7684\u65f6\u5019\u7684\u9ed8\u8ba4\u8f93\u51fa\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p> \u63cf\u8ff0<\/p>\n<p> \u4e3a\u7a7a\u53d8\u91cf\u8bbe\u7f6e\u4e00\u4e2a\u9ed8\u8ba4\u503c\u3002<br \/> \u5f53\u53d8\u91cf\u4e3a\u7a7a\u6216\u8005\u672a\u5206\u914d\u7684\u65f6\u5019,\u5c06\u7531\u7ed9\u5b9a\u7684\u9ed8\u8ba4\u503c\u66ff\u4ee3\u8f93\u51fa\u3002<\/p>\n<p> \u4f8b\u5b50<\/p>\n<pre>\r\n{$articleTitle|default:\"no title\"}\r\n{$myTitle|default:\"no title\"}<\/pre>\n<p> \u8f93\u51fa<\/p>\n<pre>\r\nDealers Will Hear Car Talk at Noon.\r\nno title<\/pre>\n<h2> truncate [\u622a\u53d6]<\/h2>\n<table border=\"0\">\n<thead>\n<tr>\n<td> \u53c2\u6570\u4f4d\u7f6e<\/td>\n<td> \u53c2\u6570\u7c7b\u578b<\/td>\n<td> \u5fc5\u9700<\/td>\n<td> \u9ed8\u8ba4<\/td>\n<td> \u63cf\u8ff0<\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td> 1<\/td>\n<td> integer<\/td>\n<td> No<\/td>\n<td> 80<\/td>\n<td> \u622a\u53d6\u5b57\u7b26\u7684\u6570\u91cf\u3002<\/td>\n<\/tr>\n<tr>\n<td> 1<\/td>\n<td> string<\/td>\n<td> No<\/td>\n<td> \u2026\u2026<\/td>\n<td> \u622a\u53d6\u540e\u8ffd\u52a0\u5728\u622a\u53d6\u8bcd\u540e\u9762\u7684\u5b57\u7b26\u4e32\u3002<\/td>\n<\/tr>\n<tr>\n<td> 1<\/td>\n<td> boolean<\/td>\n<td> No<\/td>\n<td> false<\/td>\n<td> \u662f\u622a\u53d6\u5230\u8bcd\u7684\u8fb9\u754c\uff08\u5047\uff09\u8fd8\u662f\u7cbe\u786e\u5230\u5b57\u7b26\uff08\u771f\uff09\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p> \u63cf\u8ff0<\/p>\n<p> \u4ece\u5b57\u7b26\u4e32\u5f00\u59cb\u5904\u622a\u53d6\u67d0\u957f\u5ea6\u7684\u5b57\u7b26.\u9ed8\u8ba4\u662f80\u4e2a.<\/p>\n<p> \u4f60\u4e5f\u53ef\u4ee5\u6307\u5b9a\u7b2c\u4e8c\u4e2a\u53c2\u6570\u4f5c\u4e3a\u8ffd\u52a0\u5728\u622a\u53d6\u5b57\u7b26\u4e32\u540e\u9762\u7684\u6587\u672c\u5b57\u4e32.\u8be5\u8ffd\u52a0\u5b57\u4e32\u88ab\u8ba1\u7b97\u5728\u622a\u53d6\u957f\u5ea6\u4e2d\u3002<\/p>\n<p> \u9ed8\u8ba4\u60c5\u51b5\u4e0b,smarty\u4f1a\u622a\u53d6\u5230\u4e00\u4e2a\u8bcd\u7684\u672b\u5c3e\u3002<\/p>\n<p> \u5982\u679c\u4f60\u60f3\u8981\u7cbe\u786e\u7684\u622a\u53d6\u591a\u5c11\u4e2a\u5b57\u7b26,\u628a\u7b2c\u4e09\u4e2a\u53c2\u6570\u6539\u4e3a\u201dtrue\u201d<\/p>\n<p> \u4f8b\u5b50<\/p>\n<pre>\r\n{$articleTitle}\r\n{$articleTitle|truncate}\r\n{$articleTitle|truncate:30}\r\n{$articleTitle|truncate:30:\"\"}\r\n{$articleTitle|truncate:30:\"---\"}\r\n{$articleTitle|truncate:30:\"\":true}\r\n{$articleTitle|truncate:30:\"...\":true}<\/pre>\n<p> \u8f93\u51fa<\/p>\n<pre>\r\nTwo Sisters Reunite after Eighteen Years at Checkout Counter.\r\nTwo Sisters Reunite after Eighteen Years at Checkout Counter.\r\nTwo Sisters Reunite after...\r\nTwo Sisters Reunite after\r\nTwo Sisters Reunite after---\r\nTwo Sisters Reunite after Eigh\r\nTwo Sisters Reunite after E...<\/pre>\n<h2> strip_tags [\u53bb\u9664html\u6807\u7b7e]<\/h2>\n<p> \u63cf\u8ff0<\/p>\n<p> \u53bb\u9664&lt;\u548c&gt;\u6807\u7b7e,\u5305\u62ec\u5728&lt;\u548c&gt;\u4e4b\u95f4\u7684\u4efb\u4f55\u5185\u5bb9.<\/p>\n<p> \u4f8b\u5b50<\/p>\n<pre>\r\n{$articleTitle}\r\n{$articleTitle|strip_tags}<\/pre>\n<p> \u8f93\u51fa\uff1a<\/p>\n<pre>\r\nBlind Woman Gets &lt;font face=\"helvetica\"&gt;New Kidney&lt;\/font&gt; from Dad she Hasn't\r\nSeen in &lt;b&gt;years&lt;\/b&gt;.\r\nBlind Woman Gets New Kidney from Dad she Hasn't Seen in years.<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>ECSHOP\u4f5c\u4e3a\u56fd\u5185\u4f7f\u7528\u6700\u591a\u7684\u7f51\u4e0a\u5546\u57ce\u7cfb\u7edf\uff0c\u5374\u6ca1\u6709\u4e00\u4e2a\u5f88\u597d\u7684API\u624b\u518c\uff0c\u7740\u5b9e\u6bd4\u8f83\u8ba9\u6211\u4eec\u8d39\u5fc3\uff0c\u8981\u60f3\u67e5\u627e\u4e00\u4e2a\u51fd\u6570\u7684\u529f\u80fd\uff0c\u53ea\u80fd\u901a\u8fc7\u67e5\u770b\u5176\u7a0b\u5e8f\u7684\u6e90\u4ee3\u7801\u624d\u53ef\u4ee5\u77e5\u9053\u6709\u4ec0\u4e48\u529f\u80fd\uff0c\u5b98\u65b9\u7684\u624b\u518c\u4e5f\u4e0d\u5168\u9762\uff0c\u5f88\u591a\u4e1c\u897f\u90fd\u6ca1\u6709\u7f16\u5199\u5b8c\u6210\uff0c\u53ef\u80fd\u4f5c\u8005\u5df2\u7ecf\u4e0d\u60f3\u5728\u7ef4\u62a4\u8fd9\u4e2a\u7a0b\u5e8f\u4e86\uff0cECSHOP\u7684\u7248\u672c\u4e5f\u5f88\u4e45\u6ca1\u6709\u66f4\u65b0\u4e86\u3002 \u4ecb\u4e8e\u5982\u6b64\uff0c\u6211\u5c31\u5206\u4eab\u4e00\u4e2aECSHOP\u6a21\u677f\u7cfb\u7edf\u53d8\u91cf\u8c03\u8282\u6807\u7b7e\u8bf4\u660e\uff0c\u5e0c\u671b\u5bf9\u4e8eECSHOP\u5546\u57ce\u4e8c\u6b21\u5f00\u53d1\u7684\u5f00\u53d1\u4eba\u5458\u6709\u6240\u5e2e\u52a9\u3002 escape [\u7f16\u7801] \u53c2\u6570\u4f4d\u7f6e \u53c2\u6570\u7c7b\u578b \u5fc5\u9700 \u53ef\u7528\u53c2\u6570 \u9ed8\u8ba4 \u63cf\u8ff0 1 string No html,url,quotes html \u4f7f\u7528\u4f55\u79cd\u7f16\u7801\u683c\u5f0f \u63cf\u8ff0 \u7528\u4e8ehtml\u8f6c\u7801,url\u8f6c\u7801,\u5728\u6ca1\u6709\u8f6c\u7801\u7684\u53d8\u91cf\u4e0a\u8f6c\u6362\u5355\u5f15\u53f7,\u5341\u516d\u8fdb\u5236\u8f6c\u7801,\u5341\u516d\u8fdb\u5236\u7f8e\u5316\u8f6c\u7801\u3002\u9ed8\u8ba4\u662fhtml\u8f6c\u7801\u3002 \u5b9e\u4f8b {$articleTitle} {$articleTitle|escape} {$articleTitle|escape:&#8221;html&#8221;} {* escapes&amp; &#8221; &#8216; &lt;&gt; *} {$articleTitle|escape:&#8221;url&#8221;} {$articleTitle|escape:&#8221;quotes&#8221;} nl2br [\u6362\u884c\u7b26\u66ff\u6362\u6210 &lt;br \/&gt;] \u63cf\u8ff0 \u6240\u6709\u7684\u6362\u884c\u7b26\u5c06\u88ab\u66ff\u6362\u6210 &lt;br \/&gt;.\u529f\u80fd\u540cPHP\u4e2d\u7684nl2br()\u51fd\u6570\u4e00\u6837. \u4f8b\u5b50 {$articleTitle|nl2br} \u8f93\u51fa Sun or rain expected&lt;br \/&gt;today, dark tonight default [\u9ed8\u8ba4\u503c] \u53c2\u6570\u4f4d\u7f6e \u53c2\u6570\u7c7b\u578b \u5fc5\u9700 \u9ed8\u8ba4 \u63cf\u8ff0 [&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-59700","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/59700","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=59700"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/59700\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=59700"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=59700"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=59700"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}