Linux環境ではPHPのmbstring拡張モジュールを追加します

とき禅LAMPインストールのヒント:

拡張された負荷をMBSTRING

ビューPHPバージョン

#PHPの-v

[ルート@ chandao〜]#1 PHP - Vの
PHPの警告:モジュール' MBSTRING 'すでにロードの行に不明0 
PHP 5.416(CLI)(組み込み:10月30  2018  193051 
著作権(C)1997年の - 2013年ザ・PHPグループ
のZend Engineのv2の。4.0、著作権(C)1998年の - 2013年のZend Technologies社

 インストール

#yumのインストールのphp-mbstring拡張-y

[root@chandao ~]# yum install php-mbstring -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package php-mbstring.x86_64 0:5.4.16-46.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================================================================================================================================
 Package                                               Arch                                            Version                                                 Repository                                      Size
====================================================================================================================================================================================================================
Installing:
 php-mbstring                                          x86_64                                          5.4.16-46.el7                                           local                                          505 k

Transaction Summary
====================================================================================================================================================================================================================
Install  1 Package

Total download size: 505 k
Installed size: 1.3 M
Downloading packages:
php-mbstring-5.4.16-46.el7.x86_64.rpm                                                                                                                                                        | 505 kB  00:00:01
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : php-mbstring-5.4.16-46.el7.x86_64                                                                                                                                                                1/1
  Verifying  : php-mbstring-5.4.16-46.el7.x86_64                                                                                                                                                                1/1

Installed:
  php-mbstring.x86_64 0:5.4.16-46.el7

Complete!

修改php.ini文件

# vi /etc/php.ini

在最后一行添加如下内容

extension=mbstring.so

重启Apache服务

# systemctl restart httpd

参考文章:

https://www.php.cn/php-weizijiaocheng-297010.html

おすすめ

転載: www.cnblogs.com/djlsunshine/p/11224667.html
おすすめ