{"id":4135,"date":"2020-10-08T17:17:16","date_gmt":"2020-10-08T09:17:16","guid":{"rendered":"https:\/\/www.baishitou.cn\/?p=4135"},"modified":"2020-10-08T17:31:12","modified_gmt":"2020-10-08T09:31:12","slug":"%e7%bb%87%e6%a2%a6%e6%a0%8f%e7%9b%ae%e5%88%97%e8%a1%a8%e8%b0%83%e7%94%a8%e8%87%aa%e5%ae%9a%e4%b9%89%e6%a0%8f%e7%9b%ae","status":"publish","type":"post","link":"https:\/\/www.baishitou.cn\/4135.html","title":{"rendered":"\u7ec7\u68a6\u680f\u76ee\u5217\u8868\u8c03\u7528\u81ea\u5b9a\u4e49\u680f\u76ee"},"content":{"rendered":"

\u7ec7\u68a6\u680f\u76ee\u5217\u8868\u8c03\u7528\u81ea\u5b9a\u4e49\u680f\u76ee<\/h2>\n

\u7ec7\u68a6channelartlist\u6dfb\u52a0limit\u652f\u6301\u81ea\u5b9a\u4e49\u8f93\u51fa\u680f\u76ee<\/p>\n

\u6253\u5f00 \/include\/taglib\/channelartlist.lib.php\u00a0\u641c\u7d22\u627e\u5230<\/p>\n

cacheid|<\/code><\/pre>\n

\u4fee\u6539\u4e3a\uff1a<\/p>\n

cacheid|,limit|<\/code><\/pre>\n

\u7ee7\u7eed\u627e\u5230<\/p>\n

$dsql->SetQuery<\/code><\/pre>\n

\u5728\u5b83\u4e0a\u9762\u6dfb\u52a0\u4e0b\u9762\u4ee3\u7801 \uff1a<\/p>\n

$limit = trim(preg_replace('#limit#is', '', $limit));\r\nif($limit!='') $limitsql = \" LIMIT $limit \";\r\nelse $limitsql = \" LIMIT 0,$totalnum\";<\/code><\/pre>\n

\u7ee7\u7eed\u67e5\u627e<\/p>\n

LIMIT $totalnum<\/code><\/pre>\n

\u4fee\u6539\u4e3a\uff1a<\/p>\n

$limitsql<\/code><\/pre>\n

 <\/p>\n

\u6a21\u677f\u91cc\u6807\u7b7e\u8c03\u7528\uff1a<\/p>\n

\u8c03\u75281\u4e2a\u680f\u76ee<\/strong><\/p>\n

{dede:channelartlist limit=1}\r\n\t{dede:field.typeurl\/}{dede:field.typename\/}\r\n{\/dede:channelartlist}<\/code><\/pre>\n

\u8c03\u7528\u4ece\u7b2c2\u5f00\u59cb\u680f\u76ee\uff0c\u8f93\u51fa2\u4e2a<\/strong><\/p>\n

{dede:channelartlist limit=1,2}\r\n\t{dede:field.typeurl\/}{dede:field.typename\/}\r\n{\/dede:channelartlist}<\/code><\/pre>\n

 <\/p>\n","protected":false},"excerpt":{"rendered":"

\u7ec7\u68a6\u680f\u76ee\u5217\u8868\u8c03\u7528\u81ea\u5b9a\u4e49\u680f\u76ee \u7ec7\u68a6channelartlist\u6dfb\u52a0limit\u652f\u6301\u81ea\u5b9a\u4e49\u8f93\u51fa\u680f\u76ee \u6253\u5f00 \/incl […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[1321,1322,1319,180,1320,419],"class_list":["post-4135","post","type-post","status-publish","format-standard","hentry","category-web","tag-channelartlist","tag-limit","tag-1319","tag-180","tag-1320","tag-419"],"_links":{"self":[{"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/posts\/4135","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/comments?post=4135"}],"version-history":[{"count":0,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/posts\/4135\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/media?parent=4135"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/categories?post=4135"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/tags?post=4135"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}