PHP 7.2.0 Beta 1 Released


mbstring 不是一个默认扩展。这意味着它默认没有被激活。 你必须在 configure 选项中显式激活该模块。 详情参见安装这一节。

以下是涉及到 mbstring 的相关配置选项。

  • --enable-mbstring :激活 mbstring 函数。 要使用 mbstring 函数必须启用这个选项。

    libmbflmbstring 是必要的。 libmbfl 被捆绑到了 mbstring。 如果系统已安装 libmbfl--with-libmbfl[=DIR] 可以指定使用已安装的库。

  • --disable-mbregex :禁用正则表达式函数中多字节字符的支持。

add a note add a note

User Contributed Notes 5 notes

kurdtpage at gmail dot com
10 months ago
For Linux Mint using PHP 7:
sudo apt-get install php7.0-mbstring

and don't forget to run:
sudo service apache2 restart
kacz at kaczmarowski dot com
8 years ago
Fedora 9 -- yum install php-mbstring then httpd -k restart to freshen the environment.

[EDIT BY danbrown AT php DOT net: This is true for all Red Hat Linux-based distributions using RPM and the `yum` package manager; this includes RHEL, Fedora, CentOS, Mandriva, and Intrinsic Linux, among others.]
1 year ago
mbstring is part of the libapache2-mod-php5 package in Debian. See:
tom at ritter dot vg
8 years ago
To compile with the mbstring option in gentoo, use the 'unicode' USE flag.
jmckenna at gatewaygeomatics dot com
7 years ago
The mb_split() function requires PHP to be compiled with --enable-mbregex (as of PHP 5.3.0).

To Top