eyoucms手机号如何隐藏中间4位显示星号?

    eyoucms手机号如何隐藏中间4位显示星号?首先在/extend/function.php添加以下代码:

    //手机号隐藏中间四位
    
    function ycnh_phone ($str){
    
    $str=$str;
    
    $resstr=substr_replace($str,'****',3,4);
    
    return $resstr;
    
    }

    然后在相应的模板文件里写上调用代码即可

    {$eyou.field.tel|yc_phone=###}