gpt4 book ai didi

php - 关于 PHP 配置 :--with-zlib=DIR and --with-zlib-dir=DIR

转载 作者:可可西里 更新时间:2023-11-01 00:56:06 31 4
gpt4 key购买 nike

来自 ./configure --help:

--with-zlib=DIR    Include ZLIB support (requires zlib >= 1.0.9)

--with-zlib-dir=<DIR>   Define the location of zlib install directory

第一个:为什么“--with-zlib”需要 DIR?

第二个:“定义 zlib 安装目录的位置"意思是"定义您已经安装在系统中的 zlib 目录的位置"?

“--with-zlib”和“--with-zlib-dir”有什么区别?

最佳答案

好吧,首先我认为你只浏览了 ./confiure --help 的第一部分,因为你可能想知道什么时候你会发现:

hassan@hassan:/php/php-src$ ./configure --help | grep "zlib"
--with-zlib=DIR Include ZLIB support (requires zlib >= 1.0.9)
--with-zlib-dir=<DIR> Define the location of zlib install directory
--with-zlib-dir=DIR GD: Set the path to libz install prefix
--with-zlib-dir=DIR PDO_MySQL: Set the path to libz install prefix
--with-zlib-dir=DIR ZIP: Set the path to libz install prefix
--with-zlib-dir=DIR mysqlnd: Set the path to libz install prefix

因此,当您愿意编译 zlib 扩展时,--with-zlib[=DIR] 就来了:

Zlib support in PHP is not enabled by default. You will need to configure PHP --with-zlib[=DIR]

otherwise --with-zlib-dir 当你想编译另一个需要 zlib 的扩展时使用,例如,你什么时候试图从编译 PDO Mysql Driver来源:

Optionally, the --with-zlib-dir[=DIR] is used to set the path to the libz install prefix.

关于php - 关于 PHP 配置 :--with-zlib=DIR and --with-zlib-dir=DIR,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42970888/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com