Home  >  Article  >  Backend Development  >  PHP中Call to undefined function mb_substr()处理方法

PHP中Call to undefined function mb_substr()处理方法

WBOY
WBOYOriginal
2016-06-13 12:01:571183browse

PHP中Call to undefined function mb_substr()处理方法!

最近开发微信扩展功能,用到了mb_substr()函数。系统在windows下测试都是正常的,但是放到aliyun(选用的Centos系统)下面就出现了问题,Call to undefined function mb_substr(),报出这个异常。

很显然,这是调用了没有定义的函数,可是环境都采用yum安装的,Apache和PHP都是自动安装的。怎么会出现这个错误呢?其实PHP本身也是可配置的,安装时候除了必须的扩展库会自动安装上之外,其他的库默认是不会安装的。

解决办法:

 yum install php-mbstring 命令安装,安装好后 service httpd restart 重启apache服务器,一切正常!


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn