Home > Backend Development > PHP Tutorial > mac怎么安装PHP扩展

mac怎么安装PHP扩展

PHPz
Release: 2020-09-04 16:00:50
Original
2796 people have browsed it

mac安装PHP扩展的方法:首先下载安装包,并解压源文件;然后进入解压的目录,并运行phpize命令生成配置文件;接着执行编译;最后执行命令“make install”安装即可。

mac怎么安装PHP扩展

mac怎么安装PHP扩展?

1.下载安装包(什么方式下载都可以)

2.解压源文件(不用我多说)

3.编译源文件

进入你解压的目录

运行phpize命令生成配置文件:sudo phpize

运行./configure:

1.需要找一下php-config的位置:

which php-conifg
Copy after login

2.执行命令

./configure --with-php-config=/usr/bin/php-config(注意改成自己的目录)
Copy after login

4.编译 执行命令:make

5.安装 执行命令: make install

6. 配置php.ini

再php.ini中添加:extension = 扩展名称

7.重启apache

更多相关知识,请访问PHP中文网

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template