我收到此错误:
PHP Fatal error: Call to undefined function mb_strpos() in /my/file.PHP
这很奇怪,因为mb_strpos()
是在PHP 4中引入的,而我正在运行PHP 5.3.3
$PHP -v PHP 5.3.3 (cli) (built: Feb 22 2012 19:38:14) copyright (c) 1997-2010 The PHP Group Zend Engine v2.3.0,copyright (c) 1998-2010 Zend Technologies
任何其他人遇到这样的事情并知道如何解决它?我搜查了,我无法弄明白.
PS.我正在运行centOS 5.
MBString不是PHP中的默认扩展,您必须安装它
如果你正在运行linux试试
如果你正在运行linux试试
yum install PHP-mbstring.x86_64 # for RedHat derivative systems
作为root用户
要么
apt-get install PHP-mbstring.x86_64 # for Debian derivative systems
在Windows上你必须编辑PHP.ini才能使用扩展dll库
注意:PHP 5仍然支持mb_strpos