打开 ../ include/ common.func.php添加代码 //将缩放图转变为文章第一张图片 function firstimg($str_pic) { $str_sub=substr($str_pic,0,-7).".jpg";//删除缩略图字符串最后七位,然后再补上后缀.jpg return $str_sub; } 调用的方法是: [field:litpic function='firstimg(@me)'/] 转载于:https://www.cnblogs.com/longhun/p/3753016.html