LOADING STUFF...

php7安装mongoDB扩展的方法分析

技术教程7小时前发布 北陌
12 0 0

php7安装mongoDB扩展的方法分析

本文讲述了php7安装mongoDB扩展的方法。分享给大家供大家参考,具体如下:

这里我们使用pecl命令来安装

首先来到php7的安装目录

$ /usr/local/php7/bin/pecl install mongodb

回车,执行成功后,会输出以下结果:

……
Build process completed successfully
Installing /usr/local/php7/lib/php/extensions/no-debug-non-zts-20151012/mongodb.so
install ok: channel://pecl.php.net/mongodb-1.1.7
configuration option “php_ini” is not set to php.ini location
You should add “extension=mongodb.so” to php.ini

接下来我们需要打开php.ini文件,添加extension=mongodb.so配置

或者直接执行下面命令来添加:

$ echo “extension=mongodb.so”

© 版权声明

相关文章

暂无评论

暂无评论...