PHP缺少mb_strpos函数? [英] PHP missing mb_strpos function?

查看:131
本文介绍了PHP缺少mb_strpos函数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到此错误:

PHP Fatal error:  Call to undefined function mb_strpos() in /my/file.php

这很奇怪,因为引入了 mb_strpos() PHP 4,我正在运行PHP 5.3.3

Which is odd because mb_strpos() was introduced in PHP 4, and I'm running 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

还有其他人遇到这样的事情,知道如何解决吗?我搜索了,但找不到.

Anybody else run into something like this and know how to fix it? I searched and I can't figure it out.

PS.我正在运行centOS 5.

PS. I'm running centOS 5.

推荐答案

MBString不是PHP中的默认扩展名,您必须安装它 如果您正在运行linux,请尝试

MBString is not a default extension in PHP and you have to install it if you are running linux try

yum install  php-mbstring.x86_64 # for RedHat derivative systems

以root用户身份 或

as a root user or

apt-get install php-mbstring.x86_64 # for Debian derivative systems

在Windows上,您必须编辑php.ini以使用扩展名dll库

on windows you have to edit php.ini to use the extension dll library

注意:PHP 5仍支持mb_strpos

这篇关于PHP缺少mb_strpos函数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆