Home  >  Article  >  Backend Development  >  linux系统下php安装mbstring扩展的二种方法_php实例

linux系统下php安装mbstring扩展的二种方法_php实例

WBOY
WBOYOriginal
2016-06-07 17:22:29884browse

1.执行

复制代码 代码如下:

yum install php-mbstring

2. 修改php.ini (这一步非常重要, 部分lxadmin版本无法自动修改)

复制代码 代码如下:

echo ‘extension=mbstring.so' >>/etc/php.ini #更具php安装目录而定

3. 重启web service

如果是apache: service httpd restart


方法二:
php 5.36
安装目录:/usr/local/php
 

复制代码 代码如下:

#cd /usr/src/php-5.3.6/ext/mbstring
#/usr/local/php/bin/phpize
#./configure --with-php-config=/usr/local/php/bin/php-config
#make && make install
echo ‘extension=mbstring.so' >>/usr/local/php/lib/php.ini
#/usr/local/apache2/bin/apachectl restart

使用/usr/local/php/bin/php -v #查看配置是否错误
使用php.info查看mbstring是否安装成功

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn