PHP装扩展
官网下载源码包http://pecl.php.net/
如:http://pecl.php.net/get/mongodb-1.5.2.tgz
编译 - 编译
复制# 如果装有多个php版本,此处需要些全路径
phpize
# 如果装有多个php版本,此处需要--with-php-config=/usr/local/php7/bin/php-config,带上准确的配置文件
./configure
make
make install
编译之后,.so文件放在php -i | grep extension_dir
增加配置文件:
php -i | grep 'Scan this dir for additional'
内容:
extension=xsl.so
卸载扩展
删除老的.so文件,路径一般在/usr/lib64/php/modules(php -i | grep extension_dir)
删除配置文件,路径在(php -i | grep 'Scan this dir for additional')
【推荐】还在用 ECharts 开发大屏?试试这款永久免费的开源 BI 工具!
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步