1,在php 的安装目录中 执行 phpize
例;/usr/local/php/bin/phpize
2, 进入到 php 安装包的源代码中 进入ext/mysqli 目录
例:cd /Tools/php-7.0.11/ext/mysqli
然后 执行:./configure --with-php-config=/usr/local/php/bin/php-config --with-mysql=/usr/local/mysql/
make
make install

执行完成 之后 会得到 一个/usr/local/php/lib/php/extensions/no-debug-zts-20151012/ 路径
然后 去 php.ini 中 配置 这个路径

网友评论