The content introduced in this article is about the installation and expansion of PHP, which has certain reference value. Now I share it with everyone. Friends in need can refer to it
1. Previous notes have been formatted with one click Huh, I'm really worried. Let’s re-write a note
2. The current PHP installation directory and compilation directory
php安装路径是/usr/local/php7 php编译目录是/usr/local/src/php
3. The following commands are created and executed after compiling and installing PHP.
#进入php编译目录 jack# cd /usr/local/src/php
#举例子,安装bcmath拓展 jack# cd ext/bcmath
#调用php安装路下 bin/phpize命令, #自动在当前的预拓展的目录下执行 jack# /usr/local/php7/bin/phpize
#检查下configure #注意php-config默认在php安装目录下/bin jack# ./configure --enable-bcmath --with-php-config=/usr/local/php7/bin/php-config
#安装拓展 jack# sudo make && sudo make install
#接着检验安装拓展是否成功 jack# cd /usr/local/php7 jack# find . -name *.so #接着在php.ini配置添加拓展即可【这里省略,请百度】
Related recommendations:
Automatic loading of PHP classes
Implementing PHP’s automatic dependency injection container EasyDI container
The above is the detailed content of php installation extension. For more information, please follow other related articles on the PHP Chinese website!