Home > php教程 > php手册 > body text

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

WBOY
Release: 2016-06-13 09:44:37
Original
959 people have browsed it

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是否安装成功

source:php.cn
Statement of this Website
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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!