加自定义函数文件:include/extend.func.php 实例:我添加一个通过会员ID查看会员名称的函数 function GetMemberName($str){ $dsql = new Dedesql(false); $row = $dsql->GetOne("SELECT uname FROM `dede_member` WHERE mid = '$str' "); return $row[uname]; } 前台模板调用[field:mid function="GetMemberName(@me)"/]