Home > Article > Backend Development > How to install extension modules in PHP?
How to install extension modules in PHP?
First enter the corresponding module in the "ext" directory; then execute "/usr/local/php/bin/phpize", which is to execute phpize once to generate the compiled file; finally execute the command " Make && make install".
cd /usr/local/src/php-5.4.36/ext/ # PHP 扩展模块一般在这个目录下,如果没有需要自行下载 cd curl/ # 我们以 curl 模块为例 /usr/local/php/bin/phpize # phpize 命令用于扩展 php 扩展模块 ./configure --with-php-config=/usr/local/php/bin/php-config make make install
[root@localhost curl]# vim /usr/local/php/etc/php.ini +885extension=curl.so # 指定扩展模块
[root@localhost curl]# /usr/local/php/bin/php -m | grep curl curl # 查看是否加载了扩展模块
Recommended tutorial: "PHP"
The above is the detailed content of How to install extension modules in PHP?. For more information, please follow other related articles on the PHP Chinese website!