{"id":1713,"date":"2018-06-02T23:28:16","date_gmt":"2018-06-02T15:28:16","guid":{"rendered":"http:\/\/www.baishitou.cn\/?p=1713"},"modified":"2018-06-02T23:31:38","modified_gmt":"2018-06-02T15:31:38","slug":"%e7%bb%87%e6%a2%a6dedecms%e5%86%85%e5%ae%b9%e5%9b%be%e6%96%87%e5%88%86%e7%a6%bb%e8%b0%83%e7%94%a8%e4%bb%a3%e7%a0%81","status":"publish","type":"post","link":"https:\/\/www.baishitou.cn\/1713.html","title":{"rendered":"\u7ec7\u68a6DEDECMS\u5185\u5bb9\u56fe\u6587\u5206\u79bb\u8c03\u7528\u4ee3\u7801"},"content":{"rendered":"
\u7ec7\u68a6DEDECMS\u6587\u7ae0\u6b63\u6587\u8c03\u7528\u4ee3\u7801\u4e3a{dede:field.body\/}\uff0c\u8fd9\u6837\u56fe\u7247\u548c\u6587\u7ae0\u90fd\u8c03\u7528\u51fa\u6765\u4e86\u3002\u80fd\u4e0d\u80fd\u5206\u5f00\u8c03\u7528\u5462\uff1f\u5f53\u7136\u53ef\u4ee5\u5566\uff01\u8c03\u7528\u00a0\u4ee3\u7801\u5982\u4e0b<\/p>\n
\r\n<div>\r\n{dede:field.body runphp=yes}\r\n$string = @me;\r\n$result = preg_replace(\"\/<\\s{0,}img[^>]+>\/i\",'',$string);\r\n@me = $result;\r\n{\/dede:field.body}\r\n<\/div><\/code><\/pre>\n\u00a0\u5185\u5bb9\u56fe\u7247<\/h2>\n<div>\r\n{dede:field.body runphp=yes}\r\n$string = @me;\r\npreg_match_all(\"\/<img([^>]*)\\s*src=('|\\\")([^'\\\"]+)('|\\\")\/\",$string,$matches);\r\n$imgsrc_arr = array_unique($matches[3]);\r\nforeach($imgsrc_arr as $imgsrc)\r\n{\r\n\t$result .= \"<li><img class=\\\"img\\\" src=\\\"$imgsrc\\\"><\/li>\\n\";\r\n}\r\n@me = $result;\r\n{\/dede:field.body}\r\n<\/div><\/code><\/pre>\n