571   PHP

遇到报错:

Fatal error: Call to undefined function mb_strimwidth() in /var/www/html/luckybird/wp-content/plugins/weixin-robot/weixin-robot-functions.php on line 26

应该是php环境没有支持mb_strimwidth,暂时在代码里修改吧,在对应文件加一下函数

function mb_strimwidth($str ,$start , $width ,$trimmarker ){
	$output = preg_replace('/^(?:[x00-x7F]|[xC0-xFF][x80-xBF]+){0,'.$start.'}((?:[x00-x7F]|[xC0-xFF][x80-xBF]+){0,'.$width.'}).*/s','1',$str);
	return $output.$trimmarker;
}



Leave a Reply

Your email address will not be published. Required fields are marked *