call to undefined function mb_strimwidth

前端 未结 4 1661
梦毁少年i
梦毁少年i 2021-02-19 01:06

Months ago I made a short code that uses mb_strimwidth() to exactly fit some text into a table cell, putting dots at the end of a truncated string. Now, after some

4条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-19 02:04

    if you already installed mbstring then you have to call this extension on php.ini file.

    First, detect where is your php-fpm.ini file or php.ini.

    run command

    php -i | grep php.ini
    

    it returns you path of php.ini file.

    for example

    /etc/php.ini
    

    then open file with VIM or another editor

    vim /etc/php.ini
    

    and then add mbstring extension to php.ini file

    extension=mbstring.so;
    

    finally, restart php-fpm

    systemctl restart php-fpm
    

提交回复
热议问题