//超过长度时在尾处加上省略号
function cutstr($f_tempstr,$f_tempwid)
{
if(mb_strlen($f_tempstr,'utf-8')>$f_tempwid)
{
echo mb_substr($f_tempstr,0,$f_tempwid,'utf-8')."...";
}else{
echo $f_tempstr;
}
}
//超过长度时在尾处加上省略号
function cutstr($f_tempstr,$f_tempwid)
{
if(mb_strlen($f_tempstr,'utf-8')>$f_tempwid)
{
echo mb_substr($f_tempstr,0,$f_tempwid,'utf-8')."...";
}else{
echo $f_tempstr;
}
}