{"id":31163,"date":"2024-11-25T14:47:25","date_gmt":"2024-11-25T06:47:25","guid":{"rendered":"https:\/\/fwq.ai\/blog\/31163\/"},"modified":"2024-11-25T14:47:25","modified_gmt":"2024-11-25T06:47:25","slug":"phpcms-v9%e6%90%9c%e7%b4%a2%e5%8a%9f%e8%83%bd%e6%80%8e%e4%b9%88%e5%81%9a","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/31163\/","title":{"rendered":"phpcms v9\u641c\u7d22\u529f\u80fd\u600e\u4e48\u505a"},"content":{"rendered":"<p style=\"text-align: center\"><strong><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/000\/020\/5e378bf42b76e261.jpg\" class=\"aligncenter\" title=\"phpcms v9\u641c\u7d22\u529f\u80fd\u600e\u4e48\u505a\u63d2\u56fe\" alt=\"phpcms v9\u641c\u7d22\u529f\u80fd\u600e\u4e48\u505a\u63d2\u56fe\" \/><\/strong><\/p>\n<p><strong> v9\u641c\u7d22\u529f\u80fd\u600e\u4e48\u505a\uff1f<span style=\"font-size: 14px;line-height: 1.76em\">phpcmsv9 \u5168\u7ad9\u641c\u7d22\u529f\u80fd\u5982\u4f55\u5b9e\u73b0<\/span><\/strong><\/p>\n<p>\u7ed9\u5927\u5bb6\u5206\u4eab\u4e00\u4e0b\u5982\u4f55\u8fd0\u7528\u641c\u7d22\u529f\u80fd\u5427\uff0c<\/p>\n<p>1. \u9996\u5148\uff0c \u6a21\u5757-&gt;\u5168\u7ad9\u641c\u7d22-&gt;\u6dfb\u52a0\u641c\u7d22\u5206\u7c7b\uff0c\u6dfb\u52a0\u641c\u7d22\u5206\u7c7b\uff0c\u6b64\u65f6\u751f\u6210\u7684ID\u4e3atypeid<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/image\/925\/425\/955\/1580698434812921.png\" class=\"aligncenter\" title=\"phpcms v9\u641c\u7d22\u529f\u80fd\u600e\u4e48\u505a\u63d2\u56fe1\" alt=\"phpcms v9\u641c\u7d22\u529f\u80fd\u600e\u4e48\u505a\u63d2\u56fe1\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><span>\u7acb\u5373\u5b66\u4e60<\/span>\u201c\u201d\uff1b<\/p>\n<p>2. \u6dfb\u52a0form\u8868\u5355\uff0c\u6b64\u65f6\u7684typeid\u5373\u4e3a\u4e0a\u56fe\u7684id,siteid\u4e3a\u7ad9\u70b9\u7684id<\/p>\n<pre><\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 &nbsp;&nbsp;&nbsp;\u641c\u7d22\uff1a &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <\/p>\n<p>3.\u4fee\u6539\u641c\u7d22\u9875\u9762 &nbsp; phpcms emplatesdefaultsearchlist.html<\/p>\n<pre>{pc:get&nbsp;sql=\"SELECT&nbsp;*&nbsp;FROM&nbsp;`\u8868\u540d`&nbsp;where&nbsp;title&nbsp;like&nbsp;'%$q%'&nbsp;order&nbsp;by&nbsp;id&nbsp;DESC&nbsp;\"&nbsp;num=\"10\"&nbsp;page=\"$page\"&nbsp;return=\"data\"}\n&nbsp;&nbsp;&nbsp;&nbsp;{loop&nbsp;$data&nbsp;$r}\n&nbsp;&nbsp;&nbsp;&nbsp;&lt;tr&gt;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;td&gt;\u00b7&nbsp;&lt;a&gt;{$r[title]}&lt;\/a&gt;\n&lt;\/td&gt;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;td&gt;{date('Y-m-d',$r[inputtime])}&lt;\/td&gt;\n&nbsp;&nbsp;&nbsp;&nbsp;&lt;\/tr&gt;\n&nbsp;&nbsp;&nbsp;&nbsp;{\/loop}\n&nbsp;&nbsp;&nbsp;&nbsp;{if&nbsp;empty($data)}\u672a\u627e\u5230\u7ed3\u679c{\/if}\n&nbsp;&nbsp;&nbsp;&nbsp;&lt;div&gt;{$pages}&lt;\/div&gt;\n{\/pc}<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u6b64\u65f6\uff0c\u641c\u7d22\u9875\u9762\u5c31\u53ef\u4ee5\u4e86\u3002<\/p>\n<p>PHP\u4e2d\u6587\u7f51\uff0c\u5927\u91cf\u7684\u514d\u8d39\uff0c\u6b22\u8fce\u5728\u7ebf\u5b66\u4e60\uff01<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f v9\u641c\u7d22\u529f\u80fd\u600e\u4e48\u505a\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>v9\u641c\u7d22\u529f\u80fd\u600e\u4e48\u505a\uff1fphpcmsv9 \u5168\u7ad9\u641c\u7d22\u529f\u80fd\u5982\u4f55\u5b9e\u73b0 \u7ed9\u5927\u5bb6\u5206\u4eab\u4e00\u4e0b\u5982\u4f55\u8fd0\u7528\u641c\u7d22\u529f\u80fd\u5427\uff0c 1. \u9996\u5148\uff0c \u6a21\u5757-&gt;\u5168\u7ad9\u641c\u7d22-&gt;\u6dfb\u52a0\u641c\u7d22\u5206\u7c7b\uff0c\u6dfb\u52a0\u641c\u7d22\u5206\u7c7b\uff0c\u6b64\u65f6\u751f\u6210\u7684ID\u4e3atypeid &nbsp; \u7acb\u5373\u5b66\u4e60\u201c\u201d\uff1b 2. \u6dfb\u52a0form\u8868\u5355\uff0c\u6b64\u65f6\u7684typeid\u5373\u4e3a\u4e0a\u56fe\u7684id,siteid\u4e3a\u7ad9\u70b9\u7684id \u767b\u5f55\u540e\u590d\u5236 &nbsp;&nbsp;&nbsp;\u641c\u7d22\uff1a &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 3.\u4fee\u6539\u641c\u7d22\u9875\u9762 &nbsp; phpcms emplatesdefaultsearchlist.html {pc:get&nbsp;sql=&#8221;SELECT&nbsp;*&nbsp;FROM&nbsp;`\u8868\u540d`&nbsp;where&nbsp;title&nbsp;like&nbsp;&#8216;%$q%&#8217;&nbsp;order&nbsp;by&nbsp;id&nbsp;DESC&nbsp;&#8221;&nbsp;num=&#8221;10&#8243;&nbsp;page=&#8221;$page&#8221;&nbsp;return=&#8221;data&#8221;} &nbsp;&nbsp;&nbsp;&nbsp;{loop&nbsp;$data&nbsp;$r} &nbsp;&nbsp;&nbsp;&nbsp;&lt;tr&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;td&gt;\u00b7&nbsp;&lt;a&gt;{$r[title]}&lt;\/a&gt; &lt;\/td&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;td&gt;{date(&#8216;Y-m-d&#8217;,$r[inputtime])}&lt;\/td&gt; &nbsp;&nbsp;&nbsp;&nbsp;&lt;\/tr&gt; &nbsp;&nbsp;&nbsp;&nbsp;{\/loop} &nbsp;&nbsp;&nbsp;&nbsp;{if&nbsp;empty($data)}\u672a\u627e\u5230\u7ed3\u679c{\/if} &nbsp;&nbsp;&nbsp;&nbsp;&lt;div&gt;{$pages}&lt;\/div&gt; {\/pc} \u767b\u5f55\u540e\u590d\u5236 \u6b64\u65f6\uff0c\u641c\u7d22\u9875\u9762\u5c31\u53ef\u4ee5\u4e86\u3002 PHP\u4e2d\u6587\u7f51\uff0c\u5927\u91cf\u7684\u514d\u8d39\uff0c\u6b22\u8fce\u5728\u7ebf\u5b66\u4e60\uff01 \u4ee5\u4e0a\u5c31\u662f v9\u641c\u7d22\u529f\u80fd\u600e\u4e48\u505a\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18],"tags":[],"class_list":["post-31163","post","type-post","status-publish","format-standard","hentry","category-cms"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/31163","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=31163"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/31163\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=31163"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=31163"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=31163"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}