我想安装以下内容,但不确定应该在哪里添加 --enable-zip?除了把它放在 php.ini 中还有什么其他的吗?
最佳答案
这种--enable-xyz
,或者--with-xyz
被传递给configure
脚本,这是第一个从源代码编译 PHP 时的步骤(显然是在下载/解压缩源代码之后)。
参见 Installation on Unix System > Apache 2.x on Unix systems有关的更多信息;并且,特别是给出 configure
调用示例的部分:
10. Now, configure your PHP. This is where you customize your PHP
with various options, like which extensions will be enabled. Do a
./configure --help for a list of available options. In our example
we'll do a simple configure with Apache 2 and MySQL support. Your
path to apxs may differ, in fact, the binary may even be named apxs2 on
your system.
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql
如果您想要/需要使用该--enable-zip 选项
重新编译 PHP,它将直接在此命令中执行。
关于php - 在 Mac OS X 上为 PHP --enable-zip 安装 zip 扩展,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1870003/