mysql - 编译配置PHP时,两种配置写法有什么不同

WBOY
Release: 2016-06-06 20:49:23
Original
1005 people have browsed it

在编译PHP时,

--with-扩展库=DIR

--enable-扩展库

这两种配置有什么不同

回复内容:

在编译PHP时,

--with-扩展库=DIR

--enable-扩展库

这两种配置有什么不同

很明显是取值的不同:
with 后面可以为空,即默认值;可以是路径;可以是功能名称
enable 后面不能有值,这种情况只有 enable 和 disable 可选

PHP手册中有提到:http://www.php.net/manual/zh/install.pecl.static.php

是否用 --enable-extname 或 --with-extname 取决于扩展库。通常不需要外部库文件的扩展库使用 --enable。要确认的话,在 buildconf 之后运行:$ ./configure --help | grep extname

--enable指ext目录下的已有的,--with-XXX就是别的程序,比如--with-mysql=/usr/local/mysql/ --with-openssl=/usr/local/openssl。
现在PHP有mysqlnd,可以写--with-mysql=mysqlnd、--with-mysqli=mysqlnd这样。

Related labels:
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!