<\/a><\/p>\n\u5982\u679c\u662f\u6709\u591a\u5f20\u56fe\u7247 \uff0c\u83b7\u53d6\u7684\u5c31\u662f\u6240\u6709\u56fe\u7247\u7684\u5730\u5740<\/p>\n
<\/p>\n
<\/p>\n
\u6240\u4ee5\u8fd9\u79cd\u5f53\u7136\u00a0\u4e0d\u884c\u4e86.<\/p>\n
\u89e3\u51b3\u65b9\u6cd5 :<\/p>\n
\u6253\u5f00 \/include\/common.func.php \u00a0\u6587\u4ef6\u3002<\/p>\n
\u5728\u6700\u540e\u9762\u6dfb\u52a0\u4e0b\u9762:<\/p>\n
function firstimg($str_pic) \r\n{ \r\n$str_sub=str_replace(\"-lp\",\"\",\"$str_pic\"); \/\/\u628a\u7f29\u7565\u56fe\u4e2d\u7684\u2018\"-lp\"\u2019 \u5220\u6389\u5c31\u662f\u7b2c\u4e00\u5f20\u56fe\u7684\u5730\u5740\u4e86\u3002\r\nreturn $str_sub; \r\n} <\/code><\/pre>\n <\/p>\n
\u7136\u540e\u5728\u6a21\u677f\u91cc\u5faa\u73af\u8c03\u7528\uff1a<\/p>\n
[field:litpic function=firstimg('@me')\/]
\n\u76f4\u63a5\u8c03\u7528\u65b9\u6cd5\uff1a<\/p>\n
{dede:field name='litpic' function=\"firstimg(@me)\"\/}<\/p>\n
\u8fd0\u7528\u663e\u793a\uff1a
\n<a title=\"[field:title\/]\" href=\"[field:arcurl\/]\"><img alt=\"[field:title\/]\" \u00a0src=\"[field:litpic function=firstimg('@me')\/]\"<\/strong>\/><\/a><\/p>\n\u8fd8\u6709\u4e00\u79cd\u4e0d\u7528\u4fee\u6539\u6838\u5fc3\u6587\u4ef6\u7684\u65b9\u6cd5 ,\u5c31\u662f\u4e0b\u9762\u7684\u4ee3\u7801.<\/p>\n
{dede:field.body runphp=yes}preg_match_all(\"\/<img([^>]*)\\s*src=('|\\\")([^'\\\"]+)('|\\\")\/\",@me,$matches);$imgsrc_arr = array_unique($matches[3]);@me = $imgsrc_arr[0];{\/dede:field.body}<\/code><\/pre>\n\u8fd9\u4e2a\u662fDEDEHTML\u5927\u795e\u63d0\u4f9b\u7684.\u5728\u8fd9\u91cc\u8868\u793a\u611f\u8c22!<\/p>\n","protected":false},"excerpt":{"rendered":"
\u7ec7\u68a6DEDECMS\u5185\u5bb9\u9875\u83b7\u53d6\u56fe\u7247URL\u5730\u5740\u7684\u65b9\u6cd5 {dede:sql sql=\"select * from d […]<\/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,377,180],"class_list":["post-1590","post","type-post","status-publish","format-standard","hentry","category-web","tag-dedecms","tag-377","tag-180"],"_links":{"self":[{"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/posts\/1590","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=1590"}],"version-history":[{"count":0,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/posts\/1590\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/media?parent=1590"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/categories?post=1590"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/tags?post=1590"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}