{"id":1911,"date":"2018-10-13T23:13:46","date_gmt":"2018-10-13T15:13:46","guid":{"rendered":"https:\/\/www.baishitou.cn\/?p=1911"},"modified":"2018-10-13T23:16:22","modified_gmt":"2018-10-13T15:16:22","slug":"%e7%bb%87%e6%a2%a6dedecms%e8%b0%83%e7%94%a8%e5%9b%be%e9%9b%86%e5%9b%be%e7%89%87%e6%95%b0%e9%87%8f","status":"publish","type":"post","link":"https:\/\/www.baishitou.cn\/1911.html","title":{"rendered":"\u7ec7\u68a6DEDECMS\u8c03\u7528\u56fe\u96c6\u56fe\u7247\u6570\u91cf"},"content":{"rendered":"

\u5148\u770b\u6548\u679c<\/p>\n

\"bst20181013231236\"<\/a><\/p>\n

\u6253\u5f00 \/include\/extend.func.php \u5728\u6700\u4e0b\u9762\u6dfb\u52a0\u4ee3\u7801<\/h2>\n
\/**\r\n *  \u83b7\u53d6\u56fe\u96c6\u56fe\u7247\u6570\u91cf\r\n *\r\n * @access    public\r\n * @param     string  $aid  \t\u6587\u7ae0id\r\n * @return    string\r\n *\/\r\nfunction GetImgCount($aid)     \r\n{\r\n    global $dsql;\r\n    $imgurls = '';\r\n    $row =$dsql->getone( \"Select imgurls From `dede_addonimages` where aid='$aid' \");\r\n    $imgurls= $row['imgurls'];\r\n    preg_match_all(\"\/{dede:img (.*){\\\/dede:img\/isU\",$imgurls,$wordcount);\r\n    $count=count($wordcount[1]);\r\n    return $count;\r\n}<\/code><\/pre>\n

\u4e0a\u9762\u662f\u8c03\u7528\u56fe\u96c6\u6a21\u578b\u7684\uff0c\u4f46\u5982\u679c\u5185\u5bb9\u9875\u91cc\u9762\u6dfb\u52a0\u4e86\u56fe\u96c6\u529f\u80fd\u4e5f\u60f3\u8c03\u7528\u56fe\u7247\u6570\u636e\uff0c\u5c31\u8981\u628adede_addonimages\u4fee\u6539\u6210\u6587\u7ae0\u6a21\u578b\u7684\u8868\u540d\uff1adede_addonarticle\uff0c\u5982\u679c\u4f60\u4e0d\u77e5\u9053\u4f60\u7684\u680f\u76ee\u7528\u7684\u662f\u5565\u6a21\u578b\uff0c\u5c31\u5728\u540e\u53f0\u9891\u9053\u6a21\u578b-\u00a0\u5185\u5bb9\u6a21\u578b\u7ba1\u7406\u91cc\u9762\u67e5\u770b.<\/p>\n

\"bst20181013231142\"<\/a><\/p>\n

\u9996\u9875\/\u5217\u8868\u9875\u8c03\u7528\u4ee3\u7801\uff1a<\/h2>\n
[field:id function=GetImgCount(@me)\/]<\/code><\/pre>\n

\u00a0\u5185\u5bb9\u9875\u8c03\u7528\u4ee3\u7801<\/h2>\n
{dede:field.id function=GetImgCount(@me)\/}<\/code><\/pre>\n

\u7ecf\u6d4b\u8bd5\u53d1\u73b0\uff0c\u4e0a\u9762\u4ee3\u7801\u53ea\u80fd\u8c03\u7528\u6587\u7ae0\u6a21\u578b\u6dfb\u52a0\u56fe\u96c6\u529f\u80fd\u540e\u4e0a\u4f20\u7684\u56fe\u7247\u6570\u91cf\uff0c\u65e0\u6cd5\u8c03\u7528\u5185\u5bb9\u7f16\u8f91\u6846\u91cc\u9762\u4e0a\u4f20\u7684\u56fe\u7247\u6570\u91cf\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

\u5148\u770b\u6548\u679c \u6253\u5f00 \/include\/extend.func.php \u5728\u6700\u4e0b\u9762\u6dfb\u52a0\u4ee3\u7801 \/** * \u83b7\u53d6\u56fe\u96c6\u56fe\u7247\u6570 […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[43,180,419],"class_list":["post-1911","post","type-post","status-publish","format-standard","hentry","category-web","tag-dedecms","tag-180","tag-419"],"_links":{"self":[{"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/posts\/1911","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=1911"}],"version-history":[{"count":0,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/posts\/1911\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/media?parent=1911"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/categories?post=1911"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/tags?post=1911"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}