Fatal error: Call to undefined function mb_substr()

前端 未结 4 1741
囚心锁ツ
囚心锁ツ 2021-02-12 19:32

I wanted to see your input on this concern I\'m currently experiencing. It turns out that:

 

        
4条回答
  •  栀梦
    栀梦 (楼主)
    2021-02-12 19:46

    mb_substr() is a multibyte-safe version of substr(), meaning it works with characters as opposed to bytes. This is most noticeable in UTF-8, where many characters are represented by two or more bytes.

    According to the installation instructions, mbstring is not a built-in extension. You must enable it by having the appropriate files and configuring PHP correctly. Some information can be found in the link provided, your webhost should be able to help you with the rest.

    To see if mbstring is installed: php -m | grep mbstring

    For Linux, install using

    sudo apt-get install php-mbstring

自定义标题
段落格式
字体
字号
代码语言
提交回复
热议问题