🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
*mbstring*提供了针对多字节字符串的函数,能够帮你处理 PHP 中的多字节编码。 除此以外,*mbstring*还能在可能的字符编码之间相互进行编码转换。 为了方便起见,*mbstring*设计成了处理基于 Unicode 的编码,类似 UTF-8、UCS-2 及诸多单字节的编码(在以下列出了)。 需要手动开启 以下是涉及到*mbstring*的相关配置选项。 * **\--enable-mbstring**:激活*mbstring*函数。 要使用*mbstring*函数必须启用这个选项。 libmbfl对*mbstring*是必要的。libmbfl被捆绑到了*mbstring*。 如果系统已安装libmbfl,**\--with-libmbfl\[=DIR\]**可以指定使用已安装的库。 * **\--disable-mbregex**:禁用正则表达式函数中多字节字符的支持。 * [预定义常量](https://www.php.net/manual/zh/mbstring.constants.php) * [支持编码的摘要](https://www.php.net/manual/zh/mbstring.encodings.php) * [日文字符多字节编码基础](https://www.php.net/manual/zh/mbstring.ja-basic.php) * [HTTP 输入和输出](https://www.php.net/manual/zh/mbstring.http.php) * [支持的字符编码](https://www.php.net/manual/zh/mbstring.supported-encodings.php) * [函数重载功能](https://www.php.net/manual/zh/mbstring.overload.php) * [PHP字符编码的要求](https://www.php.net/manual/zh/mbstring.php4.req.php) * [多字节字符串 函数](https://www.php.net/manual/zh/ref.mbstring.php) * [mb\_check\_encoding](https://www.php.net/manual/zh/function.mb-check-encoding.php)— 检查字符串在指定的编码里是否有效 * [mb\_chr](https://www.php.net/manual/zh/function.mb-chr.php)— Get a specific character * [mb\_convert\_case](https://www.php.net/manual/zh/function.mb-convert-case.php)— 对字符串进行大小写转换 * [mb\_convert\_encoding](https://www.php.net/manual/zh/function.mb-convert-encoding.php)— 转换字符的编码 * [mb\_convert\_kana](https://www.php.net/manual/zh/function.mb-convert-kana.php)— Convert "kana" one from another ("zen-kaku", "han-kaku" and more) * [mb\_convert\_variables](https://www.php.net/manual/zh/function.mb-convert-variables.php)— 转换一个或多个变量的字符编码 * [mb\_decode\_mimeheader](https://www.php.net/manual/zh/function.mb-decode-mimeheader.php)— 解码 MIME 头字段中的字符串 * [mb\_decode\_numericentity](https://www.php.net/manual/zh/function.mb-decode-numericentity.php)— 根据 HTML 数字字符串解码成字符 * [mb\_detect\_encoding](https://www.php.net/manual/zh/function.mb-detect-encoding.php)— 检测字符的编码 * [mb\_detect\_order](https://www.php.net/manual/zh/function.mb-detect-order.php)— 设置/获取 字符编码的检测顺序 * [mb\_encode\_mimeheader](https://www.php.net/manual/zh/function.mb-encode-mimeheader.php)— 为 MIME 头编码字符串 * [mb\_encode\_numericentity](https://www.php.net/manual/zh/function.mb-encode-numericentity.php)— Encode character to HTML numeric string reference * [mb\_encoding\_aliases](https://www.php.net/manual/zh/function.mb-encoding-aliases.php)— Get aliases of a known encoding type * [mb\_ereg\_match](https://www.php.net/manual/zh/function.mb-ereg-match.php)— Regular expression match for multibyte string * [mb\_ereg\_replace\_callback](https://www.php.net/manual/zh/function.mb-ereg-replace-callback.php)— Perform a regular expression search and replace with multibyte support using a callback * [mb\_ereg\_replace](https://www.php.net/manual/zh/function.mb-ereg-replace.php)— Replace regular expression with multibyte support * [mb\_ereg\_search\_getpos](https://www.php.net/manual/zh/function.mb-ereg-search-getpos.php)— Returns start point for next regular expression match * [mb\_ereg\_search\_getregs](https://www.php.net/manual/zh/function.mb-ereg-search-getregs.php)— Retrieve the result from the last multibyte regular expression match * [mb\_ereg\_search\_init](https://www.php.net/manual/zh/function.mb-ereg-search-init.php)— Setup string and regular expression for a multibyte regular expression match * [mb\_ereg\_search\_pos](https://www.php.net/manual/zh/function.mb-ereg-search-pos.php)— Returns position and length of a matched part of the multibyte regular expression for a predefined multibyte string * [mb\_ereg\_search\_regs](https://www.php.net/manual/zh/function.mb-ereg-search-regs.php)— Returns the matched part of a multibyte regular expression * [mb\_ereg\_search\_setpos](https://www.php.net/manual/zh/function.mb-ereg-search-setpos.php)— Set start point of next regular expression match * [mb\_ereg\_search](https://www.php.net/manual/zh/function.mb-ereg-search.php)— Multibyte regular expression match for predefined multibyte string * [mb\_ereg](https://www.php.net/manual/zh/function.mb-ereg.php)— Regular expression match with multibyte support * [mb\_eregi\_replace](https://www.php.net/manual/zh/function.mb-eregi-replace.php)— Replace regular expression with multibyte support ignoring case * [mb\_eregi](https://www.php.net/manual/zh/function.mb-eregi.php)— Regular expression match ignoring case with multibyte support * [mb\_get\_info](https://www.php.net/manual/zh/function.mb-get-info.php)— 获取 mbstring 的内部设置 * [mb\_http\_input](https://www.php.net/manual/zh/function.mb-http-input.php)— 检测 HTTP 输入字符编码 * [mb\_http\_output](https://www.php.net/manual/zh/function.mb-http-output.php)— 设置/获取 HTTP 输出字符编码 * [mb\_internal\_encoding](https://www.php.net/manual/zh/function.mb-internal-encoding.php)— 设置/获取内部字符编码 * [mb\_language](https://www.php.net/manual/zh/function.mb-language.php)— 设置/获取当前的语言 * [mb\_list\_encodings](https://www.php.net/manual/zh/function.mb-list-encodings.php)— 返回所有支持编码的数组 * [mb\_ord](https://www.php.net/manual/zh/function.mb-ord.php)— Get code point of character * [mb\_output\_handler](https://www.php.net/manual/zh/function.mb-output-handler.php)— 在输出缓冲中转换字符编码的回调函数 * [mb\_parse\_str](https://www.php.net/manual/zh/function.mb-parse-str.php)— 解析 GET/POST/COOKIE 数据并设置全局变量 * [mb\_preferred\_mime\_name](https://www.php.net/manual/zh/function.mb-preferred-mime-name.php)— 获取 MIME 字符串 * [mb\_regex\_encoding](https://www.php.net/manual/zh/function.mb-regex-encoding.php)— Set/Get character encoding for multibyte regex * [mb\_regex\_set\_options](https://www.php.net/manual/zh/function.mb-regex-set-options.php)— Set/Get the default options for mbregex functions * [mb\_scrub](https://www.php.net/manual/zh/function.mb-scrub.php)— Description * [mb\_send\_mail](https://www.php.net/manual/zh/function.mb-send-mail.php)— 发送编码过的邮件 * [mb\_split](https://www.php.net/manual/zh/function.mb-split.php)— 使用正则表达式分割多字节字符串 * [mb\_str\_split](https://www.php.net/manual/zh/function.mb-str-split.php)— Given a multibyte string, return an array of its characters * [mb\_strcut](https://www.php.net/manual/zh/function.mb-strcut.php)— 获取字符的一部分 * [mb\_strimwidth](https://www.php.net/manual/zh/function.mb-strimwidth.php)— 获取按指定宽度截断的字符串 * [mb\_stripos](https://www.php.net/manual/zh/function.mb-stripos.php)— 大小写不敏感地查找字符串在另一个字符串中首次出现的位置 * [mb\_stristr](https://www.php.net/manual/zh/function.mb-stristr.php)— 大小写不敏感地查找字符串在另一个字符串里的首次出现 * [mb\_strlen](https://www.php.net/manual/zh/function.mb-strlen.php)— 获取字符串的长度 * [mb\_strpos](https://www.php.net/manual/zh/function.mb-strpos.php)— 查找字符串在另一个字符串中首次出现的位置 * [mb\_strrchr](https://www.php.net/manual/zh/function.mb-strrchr.php)— 查找指定字符在另一个字符串中最后一次的出现 * [mb\_strrichr](https://www.php.net/manual/zh/function.mb-strrichr.php)— 大小写不敏感地查找指定字符在另一个字符串中最后一次的出现 * [mb\_strripos](https://www.php.net/manual/zh/function.mb-strripos.php)— 大小写不敏感地在字符串中查找一个字符串最后出现的位置 * [mb\_strrpos](https://www.php.net/manual/zh/function.mb-strrpos.php)— 查找字符串在一个字符串中最后出现的位置 * [mb\_strstr](https://www.php.net/manual/zh/function.mb-strstr.php)— 查找字符串在另一个字符串里的首次出现 * [mb\_strtolower](https://www.php.net/manual/zh/function.mb-strtolower.php)— 使字符串小写 * [mb\_strtoupper](https://www.php.net/manual/zh/function.mb-strtoupper.php)— 使字符串大写 * [mb\_strwidth](https://www.php.net/manual/zh/function.mb-strwidth.php)— 返回字符串的宽度 * [mb\_substitute\_character](https://www.php.net/manual/zh/function.mb-substitute-character.php)— 设置/获取替代字符 * [mb\_substr\_count](https://www.php.net/manual/zh/function.mb-substr-count.php)— 统计字符串出现的次数 * [mb\_substr](https://www.php.net/manual/zh/function.mb-substr.php)— 获取部分字符串